#46421 [Asn->Csd]: SplFileInfo() behaves incorrectly when fed with '/'

From: Date: Thu, 06 Nov 2008 01:11:48 +0000
Subject: #46421 [Asn->Csd]: SplFileInfo() behaves incorrectly when fed with '/'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130672@lists.php.net to get a copy of this message
ID: 46421 Updated by: colder@php.net Reported By: daniel dot gorski at develnet dot org -Status: Assigned +Status: Closed Bug Type: SPL related Operating System: Linux PHP Version: 5.3.0alpha2 Assigned To: colder 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: ------------------------------------------------------------------------ [2008-10-29 14:25:52] daniel dot gorski at develnet dot org Description: ------------ SplFileInfo() behaves incorrectly when fed with '/', which denotes the root directory. Reproduce code: --------------- $info = new SplFileInfo('/'); var_dump($info->isDir()); var_dump($info->isReadable()); var_dump($info->getType()); Expected result: ---------------- bool(true) bool(true) string(3) "dir" Actual result: -------------- bool(false) bool(false) bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46421&edit=1

« previous php.bugs (#130672) next »