Bug 10838: (follow-up) silence another warn
authorGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 15:48:56 +0000 (15:48 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 15:48:56 +0000 (15:48 +0000)
To test:

[1] In the staff interface, enter nothing in the patron search box
    and hit the search button.
[2] Note the errors in the logs concerning an uninitialized $count
    variable.
[3] Apply the patch and repeat step 1.  Note that this time, no
    warnings are logged.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
members/member.pl

index 59b56e3..78b762f 100755 (executable)
@@ -125,6 +125,8 @@ if ($results) {
                @$results = grep { $_->{$field} eq $patron->{$field} } @$results; 
        }
     $count = scalar(@$results);
+} else {
+    $count = 0;
 }
 
 if($count == 1){