SplFileInfo() behaves incorrectly when fed with '/'
| Bug #46421 | SplFileInfo() behaves incorrectly when fed with '/' | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-10-29 14:25 UTC | Modified: | 2008-11-06 01:11 UTC | ||
| From: | daniel dot gorski at develnet dot org | Assigned: | colder (profile) | ||
| Status: | Closed | Package: | SPL related | ||
| PHP Version: | 5.3.0alpha2 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2008-10-29 14:25 UTC] 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)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-11-06 01:11 UTC] colder@php.net