#40546 [Asn->Csd]: SplFileInfo::getPathInfo() throws an execption if directory is in root dir.
| From: | helly@php.net | Date: | Mon, 19 Feb 2007 21:05:54 +0000 |
| Subject: | #40546 [Asn->Csd]: SplFileInfo::getPathInfo() throws an execption if directory is in root dir. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109140@lists.php.net to get a copy of this message | ||
ID: 40546
Updated by: helly@php.net
Reported By: info at adaniels dot nl
-Status: Assigned
+Status: Closed
Bug Type: SPL related
Operating System: Linux/Ubuntu
PHP Version: 5.2.1
Assigned To: helly
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-02-19 19:54:30] info at adaniels dot nl
Description:
------------
SplFileInfo::getPathInfo() throws an execption if directory is in root
dir.
Reproduce code:
---------------
<?php
$fi = new SplFileInfo('/home');
echo $fi->getPathInfo()->getFilename();
?>
Expected result:
----------------
/
Actual result:
--------------
Fatal error: Uncaught exception 'RuntimeException' with message 'Cannot
create SplFileInfo for empty path' in
/home/arnold/projects/jasny/jasny-explorer/webroot/index.php:6 Stack
trace: #0
/home/arnold/projects/jasny/jasny-explorer/webroot/index.php(6):
SplFileInfo->getPathInfo() #1 {main} thrown in
/home/arnold/projects/jasny/jasny-explorer/webroot/index.php on line 6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40546&edit=1