X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/c881a1fb9628d1325ec3bd9238578a6e918b476f..01bb45df8e13f761fa88597962a9aeebd1c21e11:/selfforum-cgi/user/fo_voting.pl diff --git a/selfforum-cgi/user/fo_voting.pl b/selfforum-cgi/user/fo_voting.pl index 8ab2d0f..c8b9f9c 100644 --- a/selfforum-cgi/user/fo_voting.pl +++ b/selfforum-cgi/user/fo_voting.pl @@ -70,8 +70,8 @@ my $voted; my ($tid, $mid) = map {$_ || 0} split /;/ => $fup, 2; -$tid = ($tid=~/(\d+)/)[0] || 0; -$mid = ($mid=~/(\d+)/)[0] || 0; +$tid = (defined $tid and $tid=~/(\d+)/)? $1: 0; +$mid = (defined $mid and $mid=~/(\d+)/)? $1: 0; if ($tid and $mid and $unid) {