|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-11 07:21 UTC] salathe@php.net
-Operating System: Windows 7, x64
+Operating System:
-Assigned To:
+Assigned To: cataphract
[2011-07-11 07:21 UTC] salathe@php.net
[2011-10-29 23:17 UTC] cataphract@php.net
[2011-10-29 23:18 UTC] cataphract@php.net
-Status: Assigned
+Status: Closed
[2011-10-29 23:18 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
Description: ------------ SplFileInfo throws the following exception whenever you extend it: LogicException: In the constructor of ExtendingClass, parent::__construct() must be called and its exceptions cannot be cleared Note that, in the example below, defining the constructor explicitly and calling parent::__construct() does not fix the issue. Test script: --------------- # php -r 'class Foo extends SplFileInfo {} new SplFileInfo("foo"); new Foo("bar ");' Expected result: ---------------- No output Actual result: -------------- Fatal error: Uncaught exception 'LogicException' with message 'In the constructor of Foo, parent::__construct() must be called and its exceptions cannot be cleared' in Command line code:1 Stack trace: #0 Command line code(1): Foo->internal_construction_wrapper('bar') #1 {main} thrown in Command line code on line 1