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

From: Date: Wed, 29 Oct 2008 22:41:01 +0000
Subject: #46421 [Opn->Asn]: SplFileInfo() behaves incorrectly when fed with '/'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-130295@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: Open +Status: Assigned Bug Type: SPL related Operating System: Linux PHP Version: 5.3.0alpha2 -Assigned To: +Assigned To: colder 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 (#130295) next »