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
 [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-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 15:01:28 2019 UTC