ID: 51068 Updated by: j...@php.net Reported By: pedro dot laguna at pentura dot com -Status: Open +Status: Bogus Bug Type: SPL related Operating System: Linux PHP Version: 5.3.1 New Comment:
Use something that is actually supported: http://php.net/globiterator Previous Comments: ------------------------------------------------------------------------ [2010-02-17 14:39:58] pedro dot laguna at pentura dot com Description: ------------ glob:// wrapper doesn't support current queries like glob://* Reproduce code: --------------- <?php $it = new DirectoryIterator("glob://*"); foreach($it as $f) { printf("%s: %.1FK<br />", $f->getFilename(), $f->getSize()/1024); } ?> Expected result: ---------------- tree.php: 1.0K findregex.php: 0.6K findfile.php: 0.7K dba_dump.php: 0.9K nocvsdir.php: 1.1K phar_from_dir.php: 1.0K ini_groups.php: 0.9K directorytree.php: 0.9K dba_array.php: 1.1K class_tree.php: 1.8K Actual result: -------------- PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize(): stat failed for /tree.php' in /home/pedro/public_html/glob.php:7 Stack trace: #0 /home/pedro/public_html/glob.php(7): SplFileInfo->getSize() #1 {main} thrown in /home/pedro/public_html/glob.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51068&edit=1