From dc636f7c3421d99481a5f3d9389b0eb6f8d482bc Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 27 Sep 2022 11:49:08 +0200 Subject: [PATCH] Fix run-tests.php for explicitly given test cases The recent improvement to list skipped extensions explicitly[1] missed to properly initialize `$ignored_by_ext` for the case where an explicit set of test cases are given; this was not a problem previously, since the undefined *global* variable was coerced to int. We fix this by initializing the variable earlier. [1] --- run-tests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 7475533aad4b8..e140ee09ac1a0 100755 --- a/run-tests.php +++ b/run-tests.php @@ -362,6 +362,7 @@ function main(): void $context_line_count = 3; $num_repeats = 1; $show_progress = true; + $ignored_by_ext = []; $cfgtypes = ['show', 'keep']; $cfgfiles = ['skip', 'php', 'clean', 'out', 'diff', 'exp', 'mem']; @@ -735,7 +736,6 @@ function main(): void $test_files = []; $exts_tested = $exts_to_test; $exts_skipped = []; - $ignored_by_ext = []; sort($exts_to_test); $test_dirs = []; $optionals = ['Zend', 'tests', 'ext', 'sapi'];