Bug 18996: Resolve an uninitialized warning from ILS/Item.pm
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 1 Aug 2017 12:10:56 +0000 (14:10 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 6 Sep 2017 11:53:02 +0000 (13:53 +0200)
commit74c6b8a116658a0616b5825e9805ea65bb9cd504
treed37f19575560839fcc6e442b9fe8363283e1e968
parent67806ae612569160aac1d6cf57347d07b85e24bc
Bug 18996: Resolve an uninitialized warning from ILS/Item.pm

From the syslog call on line 107/108. The field $item->{title} has not
been initialized. When catching the warns in a test script with Test::Warn,
I got:
    Use of uninitialized value $args[1] in sprintf at /usr/lib/x86_64-linux-gnu/perl/5.20/Sys/Syslog.pm line 423.

This simply resolves the warning. We might have a closer look to this title
field on another report though.

Test plan:
Run Message.t from the next patch without this fix. It will fail since the
additional warning makes warnings_like return false.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 66a7565995c00495fe670c809d9c7cf0c900fc7f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/SIP/ILS/Item.pm