php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48428 Blank page output with Exceptions
Submitted: 2009-05-29 10:35 UTC Modified: 2009-05-29 11:49 UTC
From: kopelke at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.3.0RC2 OS: Ubuntu 9.04
Private report: No CVE-ID: None
 [2009-05-29 10:35 UTC] kopelke at gmail dot com
Description:
------------
First, I don't think this is PHP 5.3 RC related or Linux related, but at the moment I have no chace to check on XP with 5.2.
Neither did I know which category it should be in.
Please check this, thanks.

It took a while to find this. The real problem is shown in the reproduce code section.

This code works, it calls x() which will throw an Exception and output "ERROR"

<?php
try {
	function x() { throw new Exception("ERROR"); }
	(x());
} catch(Exception $e) {
	echo($e -> getMessage());
}
?>


Reproduce code:
---------------
<?php
try {
	function x() { throw new Exception("ERROR"); }
	x(x());
} catch(Exception $e) {
	echo($e -> getMessage());
}
?>

Expected result:
----------------
Expected would that the inner x() will throw the Exception, the outer one would be skipped and I get the "ERROR" string from the Exception in the catch

Actual result:
--------------
a blank page.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-29 11:41 UTC] lbarnaud@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of bug #48228
 [2009-05-29 11:49 UTC] lbarnaud@php.net
?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 09:01:30 2024 UTC