|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-07 15:56 UTC] [email protected]
-Type: Bug
+Type: Feature/Change Request
[2013-07-07 15:56 UTC] [email protected]
[2014-02-27 03:49 UTC] [email protected]
[2014-05-11 00:21 UTC] wmpalmer at gmail dot com
[2014-08-20 13:45 UTC] bpolaszek at gmail dot com
[2014-12-03 23:27 UTC] [email protected]
[2014-12-03 23:27 UTC] [email protected]
-Status: Open
+Status: Closed
[2014-12-05 07:00 UTC] [email protected]
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 05:00:01 2025 UTC |
Description: ------------ Casting an instance of SplFileInfo to boolean throws an exception. It should behave like other objects, where the cast always results in boolean true without throwing. Otherwise, it breaks common code like if (!$myObj) {...} Test script: --------------- <?php $o = new SplFileInfo('.'); var_dump((bool) $o); Expected result: ---------------- I expect (bool) true as output. Actual result: -------------- Catchable fatal error: Object of class SplFileInfo could not be converted to boolean in ...