File tree 3 files changed +27
-1
lines changed
3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ PHP NEWS
33
33
segment fault). (Nikita)
34
34
. Fixed bug #75409 (accept EFAULT in addition to ENOSYS as indicator
35
35
that getrandom() is missing). (sarciszewski)
36
+ . Fixed bug #73124 (php_ini_scanned_files() not reporting correctly).
37
+ (John Stevenson)
36
38
37
39
- Zip:
38
40
. Fixed bug #75540 (Segfault with libzip 1.3.1). (Remi)
Original file line number Diff line number Diff line change @@ -1395,7 +1395,7 @@ PHP_FUNCTION(php_ini_scanned_files)
1395
1395
return ;
1396
1396
}
1397
1397
1398
- if (strlen ( PHP_CONFIG_FILE_SCAN_DIR ) && php_ini_scanned_files ) {
1398
+ if (php_ini_scanned_files ) {
1399
1399
RETURN_STRING (php_ini_scanned_files );
1400
1400
} else {
1401
1401
RETURN_FALSE ;
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #73124 (php_ini_scanned_files relied on PHP_CONFIG_FILE_SCAN_DIR)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!empty (PHP_CONFIG_FILE_SCAN_DIR )) die ("Skip: PHP_CONFIG_FILE_SCAN_DIR must not be available " );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+ $ tempDir = sys_get_temp_dir ();
10
+ putenv ('PHP_INI_SCAN_DIR= ' .$ tempDir );
11
+
12
+ $ inifile = $ tempDir .DIRECTORY_SEPARATOR .'scan-dir.ini ' ;
13
+ @unlink ($ inifile );
14
+ file_put_contents ($ inifile , "\n" );
15
+
16
+ $ php = getenv ('TEST_PHP_EXECUTABLE ' );
17
+ passthru ('" ' .$ php .'" -r "print_r(php_ini_scanned_files());" ' );
18
+
19
+ putenv ('PHP_INI_SCAN_DIR= ' );
20
+ @unlink ($ inifile );
21
+ ?>
22
+ --EXPECTREGEX--
23
+ .*[\/\\]scan-dir\.ini.*|.*[\/\\]scan-dir\.ini
24
+ Done
You can’t perform that action at this time.
0 commit comments