Additional ini files are reported using the --ini option, but not by
`php_ini_scanned_files()`, which relied on PHP_CONFIG_FILE_SCAN_DIR.
segment fault). (Nikita)
. Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
that getrandom() is missing). (sarciszewski)
+ . Fixed bug #73124 (php_ini_scanned_files() not reporting correctly).
+ (John Stevenson)
- Zip:
. Fixed bug #75540 (Segfault with libzip 1.3.1). (Remi)
return;
}
- if (strlen(PHP_CONFIG_FILE_SCAN_DIR) && php_ini_scanned_files) {
+ if (php_ini_scanned_files) {
RETURN_STRING(php_ini_scanned_files);
} else {
RETURN_FALSE;
--- /dev/null
+--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