php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38722 Calling undefined method (php4) prints insufficient
Submitted: 2006-09-05 11:41 UTC Modified: 2006-10-19 11:29 UTC
From: hannes dot magnusson at gmail dot com Assigned: bjori (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4.4.4 OS: *
Private report: No CVE-ID: None
 [2006-09-05 11:41 UTC] hannes dot magnusson at gmail dot com
Description:
------------
Calling undefined method prints insufficient error message

Patch: http://php.is/bugs/php4.method.error.msg.diff.txt

Reproduce code:
---------------
$ sapi/cli/php -r 'class foo {}; foo::bar();'

$ sapi/cli/php -r 'class foo {}; $foo = new foo $foo->bar();'

$ sapi/cli/php -r 'bar();'


Expected result:
----------------
Fatal error: Call to undefined static function: foo::bar() 
in Command line code on line 1

Fatal error: Call to undefined method: foo->bar() in 
Command line code on line 1

Fatal error: Call to undefined function: bar() in Command 
line code on line 1


Actual result:
--------------
Fatal error: Call to undefined function:  bar() in Command 
line code on line 1

Fatal error: Call to undefined function:  bar() in Command 
line code on line 1

Fatal error: Call to undefined function:  bar() in Command 
line code on line 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-19 11:29 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC