Bug 17843: [QA Follow-up] Some polishing
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 23 Jun 2017 08:43:16 +0000 (10:43 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Jul 2017 16:42:21 +0000 (13:42 -0300)
commitca0bde1e7e168982efc8917c5836aeedea183621
tree521a2b40d8f62b7557703f1947cf7774432bf78b
parenta2be532dc244ca2e7073c4dd7693011d6aca679e
Bug 17843: [QA Follow-up] Some polishing

Resolve warning from members/summary-print.pl:
    "my" variable $itemtype masks earlier declaration in same scope

Test if find returns a Koha object in GetDescription.
Test if find returns a Koha object too in shelves.pl. While testing, I had
a crash on a biblioitem with itemtype NULL (bad record, but these things
tend to happen somehow.)
Can't call method "imageurl" on an undefined value at virtualshelves/shelves.pl line 253.
Same for opac/opac-shelves.pl.

Note: Did not add tests everywhere but generally, I have the impression that
we do not sufficiently test on the results of Koha::Object->find. Mostly we
just assume that it will find a record. Several reports include fixes to
resolve that wrong assumption.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Koha/Template/Plugin/ItemTypes.pm
members/summary-print.pl
opac/opac-shelves.pl
virtualshelves/shelves.pl