Bug 15813: Fix list-context call to ...->guarantor in opac-memberentry.pl
authorJesse Weaver <jweaver@bywatersolutions.com>
Wed, 6 Jan 2016 20:19:10 +0000 (13:19 -0700)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 24 Feb 2016 03:26:28 +0000 (03:26 +0000)
(was: Bug 14658: (followup) fix issue with list context on DBIC call)

While working on bug 14659, it was discovered that the call to
...->guarantor in list context will cause the hash to be misaligned if
there is no guarantor.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
opac/opac-memberentry.pl

index 667f201..32da430 100755 (executable)
@@ -227,7 +227,7 @@ elsif ( $action eq 'edit' ) {    #Display logged in borrower's data
 
     $template->param(
         borrower  => $borrower,
-        guarantor => Koha::Borrowers->find($borrowernumber)->guarantor(),
+        guarantor => scalar Koha::Borrowers->find($borrowernumber)->guarantor(),
     );
 
     if (C4::Context->preference('OPACpatronimages')) {