From: wickedfather at hotmail dot com
Operating system: Win 98SE
PHP version: 4.4.2
PHP Bug Type: Class/Object related
Bug description: aggregate_methods_by_list fails to take certain methods
Description:
aggregate_methods_by_list fails to aggregate certain methods that are
definitely not present in the object
Reproduce code:
---
class Absorber
{
/**
* Assigns object's properties from supplied array
* @param array associative
*/
function absorb($data)
{
$props = get_object_vars($this);
foreach (array_keys($props) as $prop)
{
if (isset($data[$prop]))
{
$this->$prop = $data[$prop];
}
}
}
}
class User
{
function User($id = NULL)
{
// doesn't work
aggregate_methods_by_list($this, 'Absorber', array('absorb'));
echo
'Aggregation:'.print_r(aggregation_info($this),1).'';
}
}
Expected result:
Expectation is to see the method absorb in the aggregation list, and to be
available as a method. The problem can be worked around by using
aggregate_methods_by_regexp($this, 'Absorber', '/absorb/');
Actual result:
--
No methods are present in the aggregation list
--
Edit bug report at http://bugs.php.net/?id=37812&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37812&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=37812&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37812&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37812&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37812&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37812&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=37812&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=37812&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37812&r=support
Expected behavior:http://bugs.php.net/fix.php?id=37812&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37812&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37812&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37812&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37812&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37812&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=37812&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37812&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37812&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37812&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=37812&r=mysqlcfg