Bug 18179: Update 1 occurrence in booksellers.pl
authorNick Clemens <nick@bywatersolutions.com>
Fri, 28 Apr 2017 16:11:28 +0000 (12:11 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Jun 2017 14:35:58 +0000 (11:35 -0300)
To test:
1 - Load http://localhost:8081/cgi-bin/koha/acqui/booksellers.pl?booksellerid=1
2 - Should get internal server erro
3 - Apply patch
4 - Reload
5 - Should not get error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

acqui/booksellers.pl

index a4d010f..6081269 100755 (executable)
@@ -83,7 +83,7 @@ my $allbaskets= $query->param('allbaskets')||0;
 my @suppliers;
 
 if ($booksellerid) {
-    push @suppliers, Koha::Acquisition::Booksellers->find( $booksellerid );
+    push @suppliers, scalar Koha::Acquisition::Booksellers->find( $booksellerid );
 } else {
     @suppliers = Koha::Acquisition::Booksellers->search({ name => $supplier });
 }