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 <jonathan.druart@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
46abff69ba
commit
b20c00ee2d
1 changed files with 1 additions and 1 deletions
|
@ -267,7 +267,7 @@ if ($op eq 'add_form') {
|
||||||
$row_data{delete} = "$script_name?op=delete_confirm&searchfield=" .$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
|
$row_data{delete} = "$script_name?op=delete_confirm&searchfield=" .$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode;
|
||||||
$j=$i;
|
$j=$i;
|
||||||
my @internal_loop = ();
|
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;
|
my %subfield_data;
|
||||||
$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
|
$subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'};
|
||||||
$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
|
$subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'};
|
||||||
|
|
Loading…
Reference in a new issue