]> git.koha-community.org Git - koha.git/commit
Bug 37425: Check for existence of biblio object before fetching cover images
authorNick Clemens <nick@bywatersolutions.com>
Mon, 22 Jul 2024 19:46:33 +0000 (19:46 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 28 Aug 2024 20:35:18 +0000 (20:35 +0000)
commit4d141a6bb7210b1d4136bed3dcc38e408f148554
treeb36421667385078fe60818185e5730d53222c448
parent864d6664245fb36150d1773c3caac1496ae35659
Bug 37425: Check for existence of biblio object before fetching cover images

This patch simply adds a conditional to ensure the biblio object has been retrieved and assumes no cover images otherwise

To test:
 1 - Enable system preference LocalCoverImages
 2 - Perform a search in staff interface
 3 - Find the biblionumebr for one of the results and delete it via the SQL backend:
     DELETE FROM biblio WHERE biblionumber=3;
 4 - Search again.
 5 - KO!
     Can't call method "cover_images" on an undefined value at /usr/share/koha/intranet/cgi-bin/catalogue/search.pl line 671.
 6 - Reindex, confirm error is gone
 7 - Apply patch
 8 - Search again
 9 - Delete a record from the results via SQL
10 - Reload and confirm no error
11 - Reindex and repeat search and confirm no error

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8fdddccffb2fa165b32e6a9c9b8d6d3dcacd5b08)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
catalogue/search.pl