From: [EMAIL PROTECTED]
Operating system: Windows 2000 Advanced Server SP2
PHP version: 4.1.1
PHP Bug Type: Reproducible crash
Bug description: PHP wrecks on using overloaded functions inside one of them
<?
class test
{
function getlist($filename,$template)
{
echo $filename.$template."<br>";
}
function getlist($filename)
{
echo $this->getlist($filename,"<default>");
}
}
$temp = new test;
$temp->getlist("test1"); // wrecks
$temp->getlist("test1","test2"); // wrecks
$temp->getlist("test1","test2","test3"); // wrecks
$temp->getlist("test1","test2","test3","test4"); // wrecks
?>
In this case php will cause a general protection fault.
If you comment out this line it works :
echo $this->getlist($filename,"<default>");
So the bug is if you want to access overloaded member methods.
The solution would be to deny function overloading inside and outside
classes.
--
Edit bug report at http://bugs.php.net/?id=15518&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15518&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15518&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15518&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15518&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15518&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15518&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15518&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15518&r=submittedtwice