Koha-clms/cataloguing
Marcel de Rooy e4ab9602c0
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 7d8a35585b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 65d267dd90)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:02:20 +01:00
..
value_builder Bug 30716: Add collection to cn_browser results 2022-08-12 10:05:15 +02:00
addbiblio.pl Bug 29511: Sort hash keys 2022-02-07 11:06:47 -05:00
addbooks.pl Bug 29437: (QA follow-up) Remove Business::ISBN from addbooks 2021-11-19 15:23:27 +01:00
additem.pl Bug 31873: Check ->find before calling ->safe_delete 2023-01-26 10:02:20 +01:00
editor.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
linkitem.pl Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
merge.pl Bug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items 2021-08-27 11:02:41 +02:00
merge_ajax.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
moveitem.pl Bug 29179: Remove useless includes in moveitem.pl 2021-10-07 10:54:59 +02:00
plugin_launcher.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ysearch.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
z3950_auth_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
z3950_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00