#40548 [Asn->Csd]: SplFileInfo::getOwner/getGroup give a warning on broken symlink
| From: | helly@php.net | Date: | Tue, 20 Feb 2007 13:08:48 +0000 |
| Subject: | #40548 [Asn->Csd]: SplFileInfo::getOwner/getGroup give a warning on broken symlink | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109173@lists.php.net to get a copy of this message | ||
ID: 40548
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.
Throwsexception now
Previous Comments:
------------------------------------------------------------------------
[2007-02-20 06:27:53] judas dot iscariote at gmail dot com
I expect an Exception in that case..
------------------------------------------------------------------------
[2007-02-19 20:58:04] info at adaniels dot nl
Description:
------------
SplFileInfo::getOwner() and SplFileInfo::getGroup() give a warning on
broken symlink. This is probably due the fact that the function follows
the symlink.
Reproduce code:
---------------
system: ln -s nothing /broken
<?php
$fi = new SplFileInfo('/broken');
echo $fi->getOwner();
echo $fi->getGroup();
?>
Expected result:
----------------
rootroot
Actual result:
--------------
Warning: SplFileInfo::getOwner() [function.SplFileInfo-getOwner]: stat
failed for /broken in
/home/arnold/projects/jasny/jasny-explorer/webroot/index.php on line 6
Warning: SplFileInfo::getGroup() [function.SplFileInfo-getGroup]: stat
failed for /broken in
/home/arnold/projects/jasny/jasny-explorer/webroot/index.php on line 7
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40548&edit=1