]> 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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Sat, 15 Jun 2019 07:01:37 +0000 (08:01 +0100)
commit62ae7ac7275329f6396d656a216ffc95b4f9494a
tree5b03f0a9e560797919854274748cf0785492eed6
parent001d433b427731a6efd55208ac3169107c830730
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>
C4/Output.pm
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt