From c916613f136bc3b2fee5164d3c0f9c9488f084c9 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 4 Jun 2021 16:29:14 +0200 Subject: [PATCH] Fix null handling in test runner when printing env --- run-tests.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 93186b6e083..333b6058fbe 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1675,6 +1675,7 @@ escape: 'E_USER_NOTICE', 'E_STRICT', // TODO Cleanup when removed from Zend Engine. 'E_RECOVERABLE_ERROR', + 'E_DEPRECATED', 'E_USER_DEPRECATED' ]; $error_consts = array_combine(array_map('constant', $error_consts), $error_consts); @@ -2782,7 +2783,7 @@ COMMAND $cmd if (strpos($log_format, 'S') !== false) { $env_lines = []; foreach ($env as $env_var => $env_val) { - $env_lines[] = "export $env_var=" . escapeshellarg($env_val); + $env_lines[] = "export $env_var=" . escapeshellarg($env_val ?? ""); } $exported_environment = $env_lines ? "\n" . implode("\n", $env_lines) . "\n" : ""; $sh_script = <<