Bug 31873: Check ->find before calling ->safe_delete
When there is no item, you cannot safely delete it :)
Resolve this warning:
Can't call method "safe_delete" on an undefined value at /usr/share/koha/cataloguing/additem.pl line 379
(Line numbers may vary across versions.)
Test plan:
Open item editor.
Add a new item.
Add another tab with same form. Delete new item.
Go back to former tab. Try to delete again.
You should see an alert now on top of the form.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit
7d8a35585b4d2047e404fb4a1ce19596737d68ab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit
65d267dd903c9158f63b4e91ff791eb0398e2849)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>