]> git.koha-community.org Git - koha.git/commit
Bug 24243: Do not explode if invalid metadata when searching catalogue
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sun, 15 Dec 2019 11:53:06 +0000 (12:53 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 23 Dec 2019 17:25:37 +0000 (17:25 +0000)
commita92a5e296757b0cee371d95dd3083b7777086ec9
tree62d98f41309f6598b92224484482c0ab42ed7f9c
parent7304459b6d3fe93e2cbb446142d9034344a9b5c8
Bug 24243: Do not explode if invalid metadata when searching catalogue

If the bibliographic record metadata cannot be decoded, the get_coins
call should catch the exception raised by Koha::Biblio::Metadata->record
to not explode

Error is: "Invalid data, cannot decode objec"

Test plan:
0/ Do not apply the patch
1/ Search for record at the OPAC
2/ Note one of the biblionumber from the first page result
3/ Set to empty string the biblio_metadata to make the error appears:
  update biblio_metadata set metadata="" where biblionumber=42;
4/ Try the same search
=> You get an internal server error
5/ Apply the patch, restart plack and try again
=> It now works, ie. it does not explode

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit bec6babff62908fe73cb33e825fac63b25c1468e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
opac/opac-search.pl