-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #587 from xinhaiz/ini_init_openfile_destroy
open file not destroy or crash in Yaf_Config_Ini, PHP 8.1 or later
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--TEST-- | ||
Bug (open file not destroy or crash in Yaf_Config_Ini, PHP 8.1 or later) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("yaf")) print "skip"; ?> | ||
--INI-- | ||
yaf.use_spl_autoload=0 | ||
yaf.lowcase_path=0 | ||
yaf.use_namespace=0 | ||
--FILE-- | ||
<?php | ||
$file = dirname(__FILE__) . "/simple.ini"; | ||
|
||
// ulimit -n, default 256 | ||
// open files will be 257 | ||
for ($i = 0; $i < 257; $i++) { | ||
$a = new Yaf_Config_Ini($file); | ||
unset($a); | ||
} | ||
|
||
var_dump("Done") | ||
?> | ||
--EXPECTF-- | ||
string(4) "Done" |