]> git.koha-community.org Git - koha.git/commit
Bug 19074: Do not crash if cardnumber does not exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 18:20:43 +0000 (15:20 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 19:25:33 +0000 (16:25 -0300)
commitbe0bf8731a2361f4fabbfff8059fef60dd364d88
treea294ce4e65154411603c0ab0f24b991da450500a
parentad1182411220d74cd13ea5cd1525b71cf7fef981
Bug 19074: Do not crash if cardnumber does not exist

If a cardnumber does not exist, $borrower will be undef and the ->category call will explode
Can't call method "category" on an undefined value at
/home/vagrant/kohaclone/tools/modborrowers.pl line 370.

This patch makes sure the patron exists before calling any methods.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
tools/modborrowers.pl