Ticket #19 (closed defect: fixed)
inheritance problem
| Reported by: | judas_iscariote | Owned by: | moo |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0.1 |
| Component: | cacher | Version: | 1.0 |
| Keywords: | Cc: | soporte@… | |
| Blocked By: | PHP Version: | ||
| Application: | Need User Feedback: | ||
| Other Exts: | SAPI: | ||
| Probability: | Blocking: |
Description
Hi the following code produces wrong results and segfaults.
<?php
abstract class Foo {
protected function & a (){}
abstract function & b ();
}
class Bar extends Foo {
protected function &a(){}
public function &b()
{
$retval =& $this->a();
}
}
$bar = new Bar();
$bar->b();
?>
- Expected result :
Notice: Only variable references should be returned by reference in /srv/www/htdocs/bug2.php on line 13 Notice: Only variable references should be returned by reference in /srv/www/htdocs/bug2.php on line 18
* Actual result :
at the first call : see expected result.
at the second call : Fatal error: Call to protected method Bar::a() from context 'Bar' in bug.php on line 17 and the apache child segfaults :(
Change History
Note: See
TracTickets for help on using
tickets.

