Bug 17829: (follow-up) Move GetMember to Koha::Patron
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 26 Oct 2017 18:40:24 +0000 (15:40 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 26 Oct 2017 18:42:48 +0000 (15:42 -0300)
Do not call method on $patron if there is no other reserves

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

circ/returns.pl

index c42e750..80f228a 100755 (executable)
@@ -174,7 +174,7 @@ if ( $query->param('reserve_id') ) {
     my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber);
 
     my $patron = Koha::Patrons->find( $nextreservinfo );
-    my $name   = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
+    my $name   = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : '';
     if ( $messages->{'transfert'} ) {
         $template->param(
             itemtitle      => $biblio->title,