|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35606 SplFileObject: crash instead of exception
Submitted: 2005-12-08 20:28 UTC Modified: 2005-12-08 21:24 UTC
From: php-work at yandex dot ru Assigned:
Status: Closed Package: SPL related
PHP Version: 5CVS-2005-12-08 (CVS) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php-work at yandex dot ru
New email:
PHP Version: OS:


 [2005-12-08 20:28 UTC] php-work at yandex dot ru
Many crashes instead of exceptions or errors

Reproduce code:
1. <?php new SplFileObject('_file_does_not_exists_', 'r'); ?>
2. <?php new mysqli('badhost', 'badlogin', 'badpassword'); ?>
3. <?php file_get_contents(''); ?>

Expected result:
1. Fatal error
2. Fatal error

Actual result:
PHP Crashes


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-08 20:38 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2005-12-08 21:10 UTC] php-work at yandex dot ru
Reproduce code:
$a = new SplFileObject('_file_does_not_exists_', 'r'); 

Expected result:
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(_file_does_not_exists_) [function.--construct]: failed to open stream: No such file or directory' in c:\www\script.php:2 Stack trace: #0 c:\www\script.php(2): SplFileObject->__construct('_file_does_not_...', 'r') #1 {main} thrown in c:\www\script.php on line 2

Actual result:
PHP Crashes
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC