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>