Bugzilla – Attachment 18814 Details for
Bug 10428
undefined check in add additem.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10428 - undefined check in add additem.pl
Bug-10428---undefined-check-in-add-additempl.patch (text/plain), 1.69 KB, created by
Marcel de Rooy
on 2013-06-10 09:18:36 UTC
(
hide
)
Description:
Bug 10428 - undefined check in add additem.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-06-10 09:18:36 UTC
Size:
1.69 KB
patch
obsolete
>From 1d9044ba37df090fff9b8d5f9c8a593f99d142f8 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 7 Jun 2013 10:17:54 +0200 >Subject: [PATCH] Bug 10428 - undefined check in add additem.pl >Content-Type: text/plain; charset=utf-8 > >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> >--- > cataloguing/additem.pl | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index a2eacef..36978bc 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -794,7 +794,7 @@ foreach my $tag ( keys %{$tagslib}){ > next if any { /^$tag$subtag$/ } @fields; > > my @values = (undef); >- @values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)->subfield($subtag))); >+ @values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); > for my $value (@values){ > my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i); > push (@loop_data, $subfield_data); >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10428
:
18724
|
18737
| 18814