From 301d20715fcdf2dd72295741d3ef3ae4de20ccc5 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 16 Sep 2013 15:48:56 +0000 Subject: [PATCH] Bug 10838: (follow-up) silence another warn 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 --- members/member.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/members/member.pl b/members/member.pl index 59b56e3057..78b762ff3d 100755 --- a/members/member.pl +++ b/members/member.pl @@ -125,6 +125,8 @@ if ($results) { @$results = grep { $_->{$field} eq $patron->{$field} } @$results; } $count = scalar(@$results); +} else { + $count = 0; } if($count == 1){ -- 2.39.5