php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44195 Calling object method from itself results in Internal Server Error
Submitted: 2008-02-20 23:06 UTC Modified: 2008-02-20 23:30 UTC
From: Denis dot D dot Gorbachev at gmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.5 OS: WinXP Pro
Private report: No CVE-ID: None
 [2008-02-20 23:06 UTC] Denis dot D dot Gorbachev at gmail dot com
Description:
------------
While editing source, I findreplaced by mistake a tiny piece of my code in one of my files. I have then modified other files. When I tried to run my code, it crashed with Internal Server Error.

Reproduce code:
---------------
EXAMPLE CODE:
<?php
class foo {
	public function bar() {
		return $this->bar();	
	}
}

$f = new foo();
$f->bar();
?>

Expected result:
----------------
Internal Server Error

Actual result:
--------------
PHP Fatal Error or PHP Warning

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-20 23:30 UTC] felipe@php.net
See#37612
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 00:01:30 2024 UTC