]> git.koha-community.org Git - koha.git/commit
Bug 15270: Make Koha::Objects->find return undef instead of crashing
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 1 Dec 2015 10:16:43 +0000 (10:16 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Mon, 7 Dec 2015 06:32:03 +0000 (07:32 +0100)
commit4f3af04623f2d37b863a1e94a862fc32becfd568
treeba4b18bd3c3719bd3c88aab80e92fd1d1ef462b8
parentc122b9b6f89c75a7ac7f7e91d8b71991bfe819b8
Bug 15270: Make Koha::Objects->find return undef instead of crashing

On 3.20.05, if AnonymousPatron is set to a nonexistent borrowernumber, the about.pl crashes with

  DBIC result type  isn't of the type Borrower at /home/koha/src/Koha/Objects.pm line 87.

This was fixed on master by
  commit 6882949b1b3bd1284e3d2877244a64edee3883ca
  Date:   Wed Apr 8 06:38:34 2015 -0400
      Bug 13967 - System preferences need a package

Test plan:
Set the AnonymousPatron pref to a nonexistent borrowernumber
Go on about.pl
Without this patch, you get the error.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Set AnonymousPatron pref to a nonexistent borrowernumber. Before the
patch, about.pl shows a nasty error. After applying the patch the
error is gone. Tests in t/db_dependent/Objects.t pass.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Koha/Objects.pm