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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/