From: syre at citiz dot net
Operating system: win2k
PHP version: 5.1.0RC1
PHP Bug Type: Scripting Engine problem
Bug description: __call not work in parent class
Description:
------------
a parent class has a __call
a sub class inherit from the parent call parent::method
whill cause undifined method error.
Reproduce code:
---------------
<?php
class test
{
private $val;
public function __call($m, $a)
{
echo "Method $m called:\n";
}
}
class test2 extends test
{
public function setX()
{
parent::setX();
}
}
$test2 = new test2();
$test2 -> setX('name');
?>
Expected result:
----------------
setX
Actual result:
--------------
undefined method
--
Edit bug report at http://bugs.php.net/?id=34739&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34739&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34739&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34739&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34739&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34739&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34739&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34739&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34739&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34739&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34739&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34739&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34739&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34739&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34739&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34739&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34739&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34739&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34739&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34739&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34739&r=mysqlcfg