From commit 1ad0e172cddce560afcc23579948d0c4a1eca71c
Bug 3142: Use filter_by_for_holds where holdability is calculated
+ $can_place_holds = $biblio_object->items->filter_by_for_hold()->count;
This is exploding early in C4::Search::searchResults if the record is indexed but deleted from the DB.
Can't call method "items" on an undefined value at /kohadevbox/koha/C4/Search.pm line 2000 C4::Search::searchResults('HASH(0x55dc9a4076c0)', 'kw,wrdl: d', 432, 20, 0, undef, 'ARRAY(0x55dc9a3757e8)', 'HASH(0x55dc99f94a50)') called at /kohadevbox/koha/opac/opac-search.pl line 613
Created attachment 127096 [details] [review]
Bug 29374: Don't crash if search engine returns a deleted record
Pushed to master for 21.11, thanks to everybody involved!