Bug 17680: [QA Follow-up] dt_from_string failing silently
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 28 Jul 2017 08:29:51 +0000 (10:29 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 28 Jul 2017 14:12:37 +0000 (11:12 -0300)
commit9a6cef0d5194151b53486d9e126f0df157a8ddb9
treee620be15fedd54e5c65a93f620c694ae02424aba
parent5017931c5a414f3f2267127309c3b1c031aec770
Bug 17680: [QA Follow-up] dt_from_string failing silently

This is a trivial fix, but finding the cause for a failing checkin in
SIPServer surely was not.
Without this simple change, I could not checkin an item while the SIP server
just closed the connection and syslog contained nothing useful.

The error can be easily reproduced without this patch by:
    use Modern::Perl;
    use C4::SIP::ILS::Item;
    my $item = C4::SIP::ILS::Item->new('some_barcode');
where some_barcode should refer to an item checked out.
You should trigger the error (with your due date):
    2017-07-28 23:59:00 is not an object at line 3.

Why the ILS/Item.pm module still compiles without a warning, is not clear
though.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/ILS/Item.pm