]> git.koha-community.org Git - koha.git/commit
Bug 23893: Catch dt_from_string exceptions
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 27 Dec 2019 18:21:30 +0000 (15:21 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 8 Jan 2020 14:38:57 +0000 (14:38 +0000)
commitbadbd7d85913749e33d9bdba397dc79836080719
tree15af9334e0e5071960ccaba5539a78f41084478c
parent4104f782d89d2b16ab4f8379da8afea3823be8ab
Bug 23893: Catch dt_from_string exceptions

This patch adds exception handling to the attributes_from_api() method.
This can happen with invalid date/datetimes, for example.

Tests are added:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Object.pm
t/db_dependent/Koha/Object.t