php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14912 Endless Recursion in method
Submitted: 2002-01-07 11:33 UTC Modified: 2002-01-07 12:07 UTC
From: fbeyer at clickhand dot de Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.1.0 OS: Windows 98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 12 = ?
Subscribe to this entry?

 
 [2002-01-07 11:33 UTC] fbeyer at clickhand dot de
I'm using PHP 4.1.0 on Windows 98 with no DLL-Extensions loaded.

Accidently I wrote a class method that called itself instead of an other method:

function getText($id)
{
...
return $text; // A valid string
}

function getHTML($id)
{
return htmlentities($this->getHTML($id)); // Here is my misstake: Should be getText() instead getHTML()
}

This code causes my Apache/1.3.20 (Win32) to crash. Okay, it's my misstake as programmer but should a wrong code be able to crash the server???

Thank you guys, you do a great job!

Ferdinand Beyer
<fbeyer@clickhand.de>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-07 12:07 UTC] mfischer@php.net
Yep, it crashes. See the archives for discussion on this topic.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC