1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00

Fix passing null to parameter of type string (#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...
This commit is contained in:
Peter Kokot
2023-08-22 03:51:31 +02:00
committed by GitHub
parent 9026596fe9
commit e199104a35
+2 -2
View File
@@ -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 ?? ''));