From a18636dcd295e6b70e0908c0245a2f5ebff4723c Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 3 Sep 2012 12:27:58 +0800 Subject: [PATCH] Bug 8714 - Poorly ordered and triggers warning in marctagstructure.pl 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. Signed-off-by: Jonathan Druart Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack Signed-off-by: Jared Camins-Esakov --- admin/marctagstructure.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 92e0d99b19..26ed3a1c92 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'}; -- 2.39.5