Bugzilla – Attachment 11942 Details for
Bug 8714
Poorly ordered and triggers warning in marctagstructure.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Changed and statement to have boundary check first.
0001-Bug-8714-Poorly-ordered-and-triggers-warning-in-marc.patch (text/plain), 1.32 KB, created by
Mark Tompsett
on 2012-09-03 04:35:11 UTC
(
hide
)
Description:
Changed and statement to have boundary check first.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2012-09-03 04:35:11 UTC
Size:
1.32 KB
patch
obsolete
>From 016879bd2b829199ddbeb6eaac8baa2998f6b2fa Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 3 Sep 2012 12:27:58 +0800 >Subject: [PATCH] Bug 8714 - Poorly ordered and triggers warning in > marctagstructure.pl >Content-Type: text/plain; charset="utf-8" > >An array boundary check was after a comparison using the array. >By changing the logic which had " and ( $j < $cnt)" to be at the >beginning "( $j < $cnt ) and ", the warning is no longer shown >in the error log. >--- > admin/marctagstructure.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index d42e345..fd8d7c2 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -267,7 +267,7 @@ if ($op eq 'add_form') { > $row_data{delete} = "$script_name?op=delete_confirm&searchfield=" .$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; > $j=$i; > my @internal_loop = (); >- while ( ( $results[$i]->{'tagfield'} == $results[$j]->{'tagfield'} ) and ( $j < $cnt ) ) { >+ while ( ( $j < $cnt ) and ( $results[$i]->{'tagfield'} == $results[$j]->{'tagfield'} ) ) { > my %subfield_data; > $subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'}; > $subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'}; >-- >1.7.9.5 >
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 8714
:
11942
|
11953