|
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] laruence@php.net
-Type: Bug
+Type: Feature/Change Request
[2013-07-07 15:56 UTC] laruence@php.net
[2014-02-27 03:49 UTC] levim@php.net
[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] datibbaw@php.net
[2014-12-03 23:27 UTC] datibbaw@php.net
-Status: Open
+Status: Closed
[2014-12-05 07:00 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08: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 ...