]> git.koha-community.org Git - koha.git/commit
Bug 19080: Handle non-existing patrons gratefully
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 17:44:50 +0000 (14:44 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 25 Aug 2017 14:03:37 +0000 (11:03 -0300)
commit9af6c4e34bc41616c03bb786201a9c10ebf13dab
tree54eb3d6f5f0b706821b4176e754321f22a4a88c1
parent9917d9cad1d9eb7adf9cc40b55693e24dc3cf0e8
Bug 19080: Handle non-existing patrons gratefully

This is a recurrent bug we have over the last years. When a script is
called with non-existent borrowernumber it will crashes.
We need to handle this gracefully instead of letting the script crashes.

On bug 18403 a new subroutine is added to the codebase
(output_and_exit_if_error) to handle this kind of errors correctly.
Since it is not pushed yet, I propose to just redirect to a script that
handle it correctly (circulation.pl) instead of adding this message to
all these scripts.

Test plan:
Hit different scripts from the members module and pass a non-existent
borrowernumber.
You must be redirected to circulation.pl with a friendly message.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
23 files changed:
circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
members/boraccount.pl
members/deletemem.pl
members/discharge.pl
members/files.pl
members/mancredit.pl
members/maninvoice.pl
members/member-flags.pl
members/member-password.pl
members/memberentry.pl
members/notices.pl
members/pay.pl
members/paycollect.pl
members/printfeercpt.pl
members/printinvoice.pl
members/purchase-suggestions.pl
members/readingrec.pl
members/routing-lists.pl
members/statistics.pl
members/summary-print.pl
members/update-child.pl
tools/viewlog.pl