Skip to content

Commit

Permalink
Fix undefined value warning in DW/Controller/Search/Interests.pm
Browse files Browse the repository at this point in the history
Use of uninitialized value in numeric ne (!=) at /home/dw/production/cgi-bin/DW/Controller/Search/Interests.pm line 410.
  • Loading branch information
kareila committed Mar 30, 2017
1 parent ac0abbf commit 68e2fad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cgi-bin/DW/Controller/Search/Interests.pm
Expand Up @@ -369,6 +369,7 @@ sub interest_handler {
# (already set to intcount, unless we have multiple ints)
if ( $opt_map{$type} ) {
$rv->{allcount} ||= scalar LJ::users_with_all_ints( \@intids );
$rv->{allcount} //= 0; # scalar(undef) isn't zero
} else {
# we just did the full search; count the existing list
$rv->{allcount} ||= scalar @uids;
Expand Down

0 comments on commit 68e2fad

Please sign in to comment.