ID:               51068
 User updated by:  pedro dot laguna at pentura dot com
 Reported By:      pedro dot laguna at pentura dot com
 Status:           Bogus
 Bug Type:         SPL related
 Operating System: Linux
 PHP Version:      5.3.1
 New Comment:

I know that I have many ways to do it, but I'm exposing that the
current glob:// wrapper is not working properly.

If it supports relative paths should support the current path when you
don't specify a full or relative path.


Previous Comments:
------------------------------------------------------------------------

[2010-02-17 15:57:25] j...@php.net

Use something that is actually supported:

   http://php.net/globiterator



------------------------------------------------------------------------

[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

Reply via email to