]> git.koha-community.org Git - koha.git/commit
Bug 10428: undefined check in add additem.pl
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Fri, 7 Jun 2013 08:17:54 +0000 (10:17 +0200)
committerChris Hall <followingthepath@gmail.com>
Sun, 18 Aug 2013 04:23:06 +0000 (16:23 +1200)
commit932a913a0098203a136b0eb2c7893a22a8840579
treef427ac09f25ab90ff89c1f375f0228c18fdc7111
parent2d845f686c49b9f7d4dc6685aac4b902d7a30d0d
Bug 10428: undefined check in add additem.pl

In additem.pl, in the code that generates item form you find:

@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)->subfield($subtag)));

This patch adds the check of $itemrecord->field($tag) undef.
I did not found a way to test it because item tag is always defined
when editing an item, but it would be safer/prettier to add this check.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e31b158245f4eff36decebf30c8a87c8cfebe472)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 54d414ee2d16a2969c91e5a83cb8c66858fed03c)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 54d414ee2d16a2969c91e5a83cb8c66858fed03c)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 3390a6efc74714f6ebd577d06f344acbff001357)
cataloguing/additem.pl