Skip to content

Commit

Permalink
Fix passing null to parameter of type string (php#12014)
Browse files Browse the repository at this point in the history
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...
  • Loading branch information
petk authored Aug 22, 2023
1 parent 9026596 commit e199104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? ''));
Expand Down

0 comments on commit e199104

Please sign in to comment.