Edit report at https://bugs.php.net/bug.php?id=60218&edit=1
ID: 60218 Patch added by: d...@php.net Reported by: yohgaki at ohgaki dot net Summary: dir() is missing Status: Open Type: Bug Package: Unknown/Other Function Operating System: Linux x86_64 PHP Version: 5.4SVN-2011-11-04 (SVN) Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: 60218-try-catch-efree-op-array Revision: 1321115944 URL: https://bugs.php.net/patch-display.php?bug=60218&patch=60218-try-catch-efree-op-array&revision=1321115944 Previous Comments: ------------------------------------------------------------------------ [2011-11-12 16:38:41] d...@php.net I added a patch that fixes it for me ------------------------------------------------------------------------ [2011-11-05 00:32:16] yohgaki at ohgaki dot net > 1. The documentation examples don't use 'new'. This works: > php -r '$o = dir(".");' It should always raise error for it, I suppose. Strange thing is 'It works' sometimes. If leak and other problem(works for sometimes) are specific to dir(), I think dropping dir() is an option. ------------------------------------------------------------------------ [2011-11-04 18:08:58] s...@php.net 1. The documentation examples don't use 'new'. This works: php -r '$o = dir(".");' 2. SPL might have better alternatives, e.g.: http://www.php.net/manual/en/class.recursivedirectoryiterator.php 3. I'll leave the bug open to track the memleak ------------------------------------------------------------------------ [2011-11-04 14:10:53] yohgaki at ohgaki dot net dir is ancient class in PHP, so it may be the first one. It may be related. Just my guess. ------------------------------------------------------------------------ [2011-11-04 14:06:43] yohgaki at ohgaki dot net s/I support dir()/I suppose dir()/ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60218 -- Edit this bug report at https://bugs.php.net/bug.php?id=60218&edit=1