Skip to content

Commit 14ec18d

Browse files
committed
Fix E_WARNING: Undefined variable $diff in /home/runner/work/php-src/php-src/run-tests.php on line 2752
1 parent c7acda0 commit 14ec18d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

run-tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,6 +2749,8 @@ function run_test(string $php, $file, array $env): string
27492749
show_file_block('mem', file_get_contents($memcheck_filename));
27502750
}
27512751

2752+
$diff = empty($diff) ? '' : preg_replace('/\e/', '<esc>', $diff);
2753+
27522754
show_result(implode('&', $restype), $tested, $tested_file, $info, $diff);
27532755

27542756
foreach ($restype as $type) {
@@ -2761,8 +2763,6 @@ function run_test(string $php, $file, array $env): string
27612763
];
27622764
}
27632765

2764-
$diff = empty($diff) ? '' : preg_replace('/\e/', '<esc>', $diff);
2765-
27662766
$junit->markTestAs($restype, $shortname, $tested, null, $info, $diff);
27672767

27682768
return $restype[0] . 'ED';

0 commit comments

Comments
 (0)