Bug 2944 fix courtesy of Amr Denni
authorChris Cormack <chris@bigballofwax.co.nz>
Sun, 3 May 2009 05:02:22 +0000 (17:02 +1200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:15:26 +0000 (21:15 +0200)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Search.pm

index 988a7a2..6edf8dd 100644 (file)
@@ -223,7 +223,7 @@ sub SimpleSearch {
         my $search_result =
           (      $result->{hits}
               && $result->{hits} > 0 ? $result->{'RECORDS'} : [] );
-        return ( undef, $search_result, scalar($search_result) );
+        return ( undef, $search_result, scalar($result->{hits}) );
     }
     else {
         # FIXME hardcoded value. See catalog/search.pl & opac-search.pl too.