php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70548 Redundant information printed in case of uncaught engine exception
Submitted: 2015-09-22 05:49 UTC Modified: -
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sebastian@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0Git-2015-09-22 (Git) OS: Irrelevant
Private report: No CVE-ID: None
 [2015-09-22 05:49 UTC] sebastian@php.net
Description:
------------
When an engine exception such as TypeError is not handled this leads to a fatal error. The error message displayed contains the source location twice.

Test script:
---------------
<?php
class C
{
    public function m() : int
    {
        return 'foo';
    }
}

$o = new C;
$o->m();


Expected result:
----------------
Fatal error: Uncaught TypeError: Return value of C::m() must be of the type integer, string returned in /home/sb/test.php on line 6
Stack trace:
#0 /home/sb/test.php(11): C->m()
#1 {main}
  thrown in /home/sb/test.php on line 6


Actual result:
--------------
Fatal error: Uncaught TypeError: Return value of C::m() must be of the type integer, string returned in /home/sb/test.php on line 6 in /home/sb/test.php:6
Stack trace:
#0 /home/sb/test.php(11): C->m()
#1 {main}
  thrown in /home/sb/test.php on line 6


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-23 05:05 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=504cd492e1b5c29abba7712438bf34934ee96c57
Log: Fixed bug #70548 (Redundant information printed in case of uncaught engine exception)
 [2015-09-23 05:05 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-09-29 13:10 UTC] ab@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=504cd492e1b5c29abba7712438bf34934ee96c57
Log: Fixed bug #70548 (Redundant information printed in case of uncaught engine exception)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=504cd492e1b5c29abba7712438bf34934ee96c57
Log: Fixed bug #70548 (Redundant information printed in case of uncaught engine exception)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC