Bug #901: Seg fault - creating object with boolean default variable in another object
| From: | glouie at acm dot org | Date: | Thu, 05 Nov 1998 21:27:42 +0000 |
| Subject: | Bug #901: Seg fault - creating object with boolean default variable in another object | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2232@lists.php.net to get a copy of this message | ||
From: glouie@acm.org
Operating system: Linux RedHat 5.1
PHP version: 3.0.3
PHP Bug Type: Reproduceable crash
Bug description: Seg fault - creating object with boolean default variable in another object
The below script causes a segmentation fault when the commented out line in the second class is
uncommented. There is no crash when the default value "true" is replaced with a string or
a number. It seems the problem occurs when a Boolean, true or false, is the default value for the
constructor of the first class "param".
<HTML>
<HEAD>
<TITLE>Test</TITLE>
</HEAD>
<BODY>
<?php
// require("parm.h");
class param {
var $parm;
function param($inParm = true) {
$this->parm = $inParm;
}
}
class parmAddrTelephone extends param {
var $area;
function parmAddrTelephone() {
// Uncomment the line below
// $this->area = new param();
}
}
echo "<BR>Version 25.";
echo "<BR>Done.";
?>
</BODY>
</HTML>
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net