-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #73124: php_ini_scanned_files()
Additional ini files are reported using the --ini option, but not by `php_ini_scanned_files()`, which relied on PHP_CONFIG_FILE_SCAN_DIR.
- Loading branch information
1 parent
8b57a5b
commit 6ed242d
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Bug #73124 (php_ini_scanned_files relied on PHP_CONFIG_FILE_SCAN_DIR) | ||
--SKIPIF-- | ||
<?php | ||
if (!empty(PHP_CONFIG_FILE_SCAN_DIR)) die("Skip: PHP_CONFIG_FILE_SCAN_DIR must not be available"); | ||
?> | ||
--FILE-- | ||
<?php | ||
$tempDir = sys_get_temp_dir(); | ||
putenv('PHP_INI_SCAN_DIR='.$tempDir); | ||
|
||
$inifile = $tempDir.DIRECTORY_SEPARATOR.'scan-dir.ini'; | ||
@unlink($inifile); | ||
file_put_contents($inifile, "\n"); | ||
|
||
$php = getenv('TEST_PHP_EXECUTABLE'); | ||
passthru('"'.$php.'" -r "print_r(php_ini_scanned_files());"'); | ||
|
||
putenv('PHP_INI_SCAN_DIR='); | ||
@unlink($inifile); | ||
?> | ||
--EXPECTREGEX-- | ||
.*[\/\\]scan-dir\.ini.*|.*[\/\\]scan-dir\.ini | ||
Done |