From 37d8574b9d9976530536f3be75f76e7718852416 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 21 Aug 2023 18:52:28 +0200 Subject: [PATCH] Fix passing null to parameter of type string This fixes builds without cgi or phpdbg: ./configure --disable-cgi --disable-phpdbg make ./sapi/cli/php run-tests.php Otherwise, deprecation warnings (since PHP-8.1) are emitted: Deprecated: escapeshellarg(): Passing null to parameter #1 ($arg) of type string is deprecated in run-tests.php... --- run-tests.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-tests.php b/run-tests.php index 6f10e4090bdbf..1bcc6aa7b22d9 100755 --- a/run-tests.php +++ b/run-tests.php @@ -683,8 +683,8 @@ function main(): void $environment['TEST_PHP_EXECUTABLE_ESCAPED'] = escapeshellarg($php); putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi"); $environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi; - putenv("TEST_PHP_CGI_EXECUTABLE_ESCAPED=" . escapeshellarg($php_cgi)); - $environment['TEST_PHP_CGI_EXECUTABLE_ESCAPED'] = escapeshellarg($php_cgi); + putenv("TEST_PHP_CGI_EXECUTABLE_ESCAPED=" . escapeshellarg($php_cgi ?? '')); + $environment['TEST_PHP_CGI_EXECUTABLE_ESCAPED'] = escapeshellarg($php_cgi ?? ''); putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg"); $environment['TEST_PHPDBG_EXECUTABLE'] = $phpdbg; putenv("TEST_PHPDBG_EXECUTABLE_ESCAPED=" . escapeshellarg($phpdbg ?? ''));