Skip to content

Commit 2b57a8e

Browse files
committed
Fix undefined index error
1 parent 2f3cf06 commit 2b57a8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

run-tests.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3004,7 +3004,9 @@ function generate_array_diff(array $ar1, array $ar2, bool $is_reg, array $w): ar
30043004
}
30053005

30063006
while ($idx2 < $cnt2) {
3007-
$add_context_lines($mapping[$idx2] + 1);
3007+
if (isset($mapping[$idx2])) {
3008+
$add_context_lines($mapping[$idx2] + 1);
3009+
}
30083010
$diff[] = $format_actual_line($idx2 + 1, $ar2[$idx2++]);
30093011
}
30103012
$add_context_lines(min($old_k1 + $context_line_count + 1, $cnt1 + 1));

0 commit comments

Comments
 (0)