Skip to content

Commit e199104

Browse files
authored
Fix passing null to parameter of type string (php#12014)
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...
1 parent 9026596 commit e199104

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
@@ -683,8 +683,8 @@ function main(): void
683683
$environment['TEST_PHP_EXECUTABLE_ESCAPED'] = escapeshellarg($php);
684684
putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi");
685685
$environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi;
686-
putenv("TEST_PHP_CGI_EXECUTABLE_ESCAPED=" . escapeshellarg($php_cgi));
687-
$environment['TEST_PHP_CGI_EXECUTABLE_ESCAPED'] = escapeshellarg($php_cgi);
686+
putenv("TEST_PHP_CGI_EXECUTABLE_ESCAPED=" . escapeshellarg($php_cgi ?? ''));
687+
$environment['TEST_PHP_CGI_EXECUTABLE_ESCAPED'] = escapeshellarg($php_cgi ?? '');
688688
putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg");
689689
$environment['TEST_PHPDBG_EXECUTABLE'] = $phpdbg;
690690
putenv("TEST_PHPDBG_EXECUTABLE_ESCAPED=" . escapeshellarg($phpdbg ?? ''));

0 commit comments

Comments
 (0)