Skip to content

Commit c916613

Browse files
committed
Fix null handling in test runner when printing env
1 parent 1143155 commit c916613

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

run-tests.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,7 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested): v
16751675
'E_USER_NOTICE',
16761676
'E_STRICT', // TODO Cleanup when removed from Zend Engine.
16771677
'E_RECOVERABLE_ERROR',
1678+
'E_DEPRECATED',
16781679
'E_USER_DEPRECATED'
16791680
];
16801681
$error_consts = array_combine(array_map('constant', $error_consts), $error_consts);
@@ -2782,7 +2783,7 @@ function run_test(string $php, $file, array $env): string
27822783
if (strpos($log_format, 'S') !== false) {
27832784
$env_lines = [];
27842785
foreach ($env as $env_var => $env_val) {
2785-
$env_lines[] = "export $env_var=" . escapeshellarg($env_val);
2786+
$env_lines[] = "export $env_var=" . escapeshellarg($env_val ?? "");
27862787
}
27872788
$exported_environment = $env_lines ? "\n" . implode("\n", $env_lines) . "\n" : "";
27882789
$sh_script = <<<SH

0 commit comments

Comments
 (0)