X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=labels%2Flabel-item-search.pl;h=9b920094cf1a92c030608aff44b1b11b249fb88b;hb=c5d1d9b62393d5f6e03ab2fd03bd2b0f8124354c;hp=9a5212aee3a2edcf7f6f68a3f95be75da4038501;hpb=e3421f0f9f24f55dd5d7a418837f581e87ea75dd;p=koha_fer diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl index 9a5212aee3..9b920094cf 100755 --- a/labels/label-item-search.pl +++ b/labels/label-item-search.pl @@ -13,9 +13,9 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; @@ -92,8 +92,8 @@ if ( $op eq "do_search" ) { ( $error, $marcresults, $total_hits ) = SimpleSearch( $ccl_query, $offset, $resultsperpage ); - if (scalar($marcresults) > 0) { - $show_results = scalar @$marcresults; + if (!defined $error && @{$marcresults} ) { + $show_results = @{$marcresults}; } else { $debug and warn "ERROR label-item-search: no results from SimpleSearch";