Created
December 5, 2012 13:33
-
-
Save everzet/4215537 to your computer and use it in GitHub Desktop.
Why, php? WHY???
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP Fatal error: Uncaught exception 'LogicException' with message 'The parent constructor was not called: the object is in an invalid state ' in splfileobject.php:16 | |
Stack trace: | |
splfileobject.php(16): SplFileInfo->_bad_state_ex() | |
#1 {main} | |
thrown in splfileobject.php on line 16 | |
Fatal error: Uncaught exception 'LogicException' with message 'The parent constructor was not called: the object is in an invalid state ' in splfileobject.php:16 | |
Stack trace: | |
#0 splfileobject.php(16): SplFileInfo->_bad_state_ex() | |
#1 {main} | |
thrown in splfileobject.php on line 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class cls1 extends \SplFileObject | |
{ | |
public function __construct() | |
{ | |
} | |
public function fpassthru() | |
{ | |
// does nothing | |
} | |
} | |
$cl = new cls1; | |
$cl->fpassthru(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone who wants details about what is actually happening here;
SplFileObject will throw this error if you either;
or