[Koha-bugs] [Bug 15155] Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 25 16:03:36 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15155

--- Comment #4 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
With a debarred value set to NULL, I don't know at all how you could get this
error.
Could you confirm that the line 1966 of your C4/Circulation.pm is the same as
the ligne 1972 of the following snippet (from 3.20.x):

1967         } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) {
1968              if ( $borrower->{debarred} eq "9999-12-31") {
1969                 $messages->{'ForeverDebarred'} = $borrower->{'debarred'};
1970              } else {
1971                   my $borrower_debar_dt = dt_from_string(
$borrower->{debarred} );
1972                   $borrower_debar_dt->truncate(to => 'day');
1973                   my $today_dt = $today->clone()->truncate(to => 'day');
1974                   if ( DateTime->compare( $borrower_debar_dt, $today_dt )
!= -1 ) {
1975                       $messages->{'PrevDebarred'} =
$borrower->{'debarred'};
1976                   }
1977              }

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list