Bug #62419 [Com]: RuntimeException throws fatal error if passing a previous exception to the ctor
| From: | Sjon at hortensius dot net | Date: | Sat, 30 Jun 2012 13:36:45 +0000 |
| Subject: | Bug #62419 [Com]: RuntimeException throws fatal error if passing a previous exception to the ctor | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-171644@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62419&edit=1
ID: 62419
Comment by: Sjon at hortensius dot net
Reported by: bugs dot php at mohiva dot com
Summary: RuntimeException throws fatal error if passing a
previous exception to the ctor
Status: Open
Type: Bug
Package: SPL related
Operating System: Gentoo Linux
PHP Version: 5.4.4
Block user comment: N
Private report: N
New Comment:
I cannot reproduce this, it seems to work fine?
http://3v4l.org/IAF3d#v530
Previous Comments:
------------------------------------------------------------------------
[2012-06-26 11:26:52] bugs dot php at mohiva dot com
Description:
------------
If you pass a previous exception to the constructor of the RuntimeException class, then PHP throws a
fatal error without an error message. I have tested those exceptions which are derived from
RuntimeException, and they all work fine. The same counts for the base Exception class.
Test script:
---------------
<?php
throw new RuntimeException("Exception message", 0, new Exception());
Expected result:
----------------
Fatal error: Uncaught exception 'RuntimeException' ... on line 3
Actual result:
--------------
Fatal error: in exception.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62419&edit=1