#43131 [Opn->Bgs]: Wrong error message reporting
| From: | tony2001@php.net | Date: | Mon, 12 Nov 2007 10:07:33 +0000 |
| Subject: | #43131 [Opn->Bgs]: Wrong error message reporting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119508@lists.php.net to get a copy of this message | ||
ID: 43131
Updated by: tony2001@php.net
Reported By: giovanni at giacobbi dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.4.7
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-10-31 16:56:13] crescentfreshpot at yahoo dot com
Got the expected result in php 5.2.1: "Fatal error: Call to undefined
method B::g() in ..."
------------------------------------------------------------------------
[2007-10-29 18:52:51] giovanni at giacobbi dot net
Description:
------------
As you can see from the test case, the reported message is wrong.
The call type is static on class B, while the error reports a dynamic
(instance) call on class A, which is misleading for debugging.
Reproduce code:
---------------
<?php
class B {
function x() {
}
}
class A {
function m() {
B::g();
}
}
$a = new A();
$a->m();
Expected result:
----------------
Fatal error: Call to undefined static function: b::g() in x.php on line
10
Actual result:
--------------
Fatal error: Call to undefined method: a->g() in x.php on line 10
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43131&edit=1