[Koha-bugs] [Bug 15087] New: make dt_from_string return undef for '0000-00-00'
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Oct 29 23:57:04 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15087
Bug ID: 15087
Summary: make dt_from_string return undef for '0000-00-00'
Change sponsored?: ---
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: bgkriegel at gmail.com
QA Contact: testopia at bugs.koha-community.org
Current master, define circulation rule All, All any number of days,
but left 'Hard due date' EMPTY.
Try to checkout something to a patron, you get
Can't locate object method "truncate" via package "-1" (perhaps you forgot to
load "-1"?) at ....
Problem comes from GetHardDueDate, it returns
return (dt_from_string($rule->{hardduedate},
'iso'),$rule->{hardduedatecompare});
But dt_from_string returns without value in case of '0000-00-00' date,
return if $date_string and $date_string =~ m|^0000-0|
which evaluates to an empty list in this case, making the final return value
for GetHardDueDate ( -1 ) instead of ( undef, -1 )
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list