]> git.koha-community.org Git - koha.git/commit
Bug 23117: Shortcut additem.pl on nonexistent biblionumber
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 13 Jun 2019 16:06:29 +0000 (11:06 -0500)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 20 Jun 2019 12:44:38 +0000 (14:44 +0200)
commit8c8d86ef30f38d13f75d7ed1600b3d27b70a6568
tree72d2faf68ae8707e2236754986bef44264a9aec3
parenta8cc9d5f49f36a5bf69265f3062f1a7a8ee0fdf4
Bug 23117: Shortcut additem.pl on nonexistent biblionumber

To prevent additem.pl to crash when called with a nonexistent
biblionumber we are here implementing the blocking_error.inc trick to
display a friendly message instead.

Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.

Test plan:
hit
/cataloguing/additem.pl?biblionumber=
/cataloguing/additem.pl?biblionumber=424242
You will get a friendly "Bibliographic record not found." message,
instead of a 500

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 62ae7ac7275329f6396d656a216ffc95b4f9494a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Output.pm
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt