X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/9218fb0859abdc5a09758bed809b26902ae179d6..8bd9a0d82f7e21d9340a4470258e2cad2638deca:/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) {