#48361 [Opn->Ver]: SplFileInfo::getPathinfo no returning info of path

From: Date: Fri, 22 May 2009 16:01:28 +0000
Subject: #48361 [Opn->Ver]: SplFileInfo::getPathinfo no returning info of path
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137649@lists.php.net to get a copy of this message
 ID:               48361
 Updated by:       scottmac@php.net
 Reported By:      petercowburn at gmail dot com
-Status:           Open
+Status:           Verified
 Bug Type:         SPL related
 Operating System: OS X
 PHP Version:      5.3.0RC2
-Assigned To:      
+Assigned To:      colder


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

[2009-05-22 10:30:21] petercowburn at gmail dot com

Description:
------------
It appears that using PHP5.3.0RC2-dev the SplFileInfo::getPathinfo
method just returns the SplFileInfo object on which it was called rather
than an SplFileInfo object for its path.



Reproduce code:
---------------
<?php
$info = new SplFileInfo('/usr/bin/php');
$parent_info = $info->getPathInfo();
var_dump($parent_info->getRealPath());
?>

Expected result:
----------------
string(8) "/usr/bin"


Actual result:
--------------
string(12) "/usr/bin/php"


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


-- 
Edit this bug report at http://bugs.php.net/?id=48361&edit=1



Thread (7 messages)

« previous php.bugs (#137649) next »