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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fbeyer at clickhand dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC