ID:               43131
 Comment by:       crescentfreshpot at yahoo dot com
 Reported By:      giovanni at giacobbi dot net
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      4.4.7
 New Comment:

Got the expected result in php 5.2.1: "Fatal error: Call to undefined
method B::g() in ..."


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to