ID: 27868
User updated by: blackei2k at gmx dot de
Reported By: blackei2k at gmx dot de
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Linux
PHP Version: 5.0.0RC1
New Comment:
I got a working (segfaulting) test-case here:
<?php
class foo {
function __construct() {
$a = 0 ;
if ($a == 0)
throw new Exception ('$a == 0 in foo::_constructor');
}
function zar()
{
return 0;
}
}
class bar extends foo {
function __construct()
{
try {
parent::__construct();
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
return true;
}
}
$o = new bar;
$o->zar();
?>
Hope that helps
Previous Comments:
------------------------------------------------------------------------
[2004-04-05 07:26:08] blackei2k at gmx dot de
Description:
------------
I get a segfault while running a script of mine. Here what apache's
error.log says:
[Mon Apr 5 13:36:36 2004] [notice] child pid 2072 exit signal
Segmentation fault (11)
It happens when i call the function
set_common_vars() which is a method of a class. If i run var_dump($o)
($o being an instance of the class set_common_vars is a member of) the
script errors as it should withoot segfaulting.
The function ist defined as:
function sets_common_vars()
{
$this->strCat = (isset ($_GET['load']) ? $_GET['load'] :
'homepage');
$this->strGet = $_SERVER['PHP_SELF'] . '?' . 'load=' .
$strCat;
return true;
}
This is very strange. I tried to build up a test-case as i thought it
was related to the try {} catch blocks in the contructor, but it
wasn't. My test-case did it's work as it was supposed to. I'm not sure
what i can do, as the provided information above will most likely not
help much tracing the bug to its source.
As the new object model is based on ZE2 i have classified this as an
engine issue.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27868&edit=1