X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/c881a1fb9628d1325ec3bd9238578a6e918b476f..8bd9a0d82f7e21d9340a4470258e2cad2638deca:/selfforum-cgi/user/fo_voting.pl?ds=inline 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) {