stream wrappers). (Tony)
- Fixed bug #38378 (wddx_serialize_value() generates no wellformed xml).
(sj at sjaensch dot org, grzegorz dot nosek at netart dot pl, Tony).
+- Fixed bug #37812 (aggregate_methods_by_list fails to take certain methods).
+ (Hannes)
17 Aug 2006, Version 4.4.4
- Fixed memory_limit on 64bit systems. (Stefan E.)
*/
zend_hash_internal_pointer_reset(Z_ARRVAL_P(list_hash));
while (zend_hash_get_current_key_ex(Z_ARRVAL_P(list_hash), &func_name, &func_name_len, &num_key, 0, NULL) == HASH_KEY_IS_STRING) {
- if (!strncmp(func_name, from_ce->name, MIN(func_name_len-1, from_ce->name_length)) ||
+ if (!strncmp(func_name, from_ce->name, MAX(func_name_len-1, from_ce->name_length)) ||
func_name[0] == '_' ||
zend_hash_find(&from_ce->function_table, func_name, func_name_len, (void**)&function) == FAILURE) {
zend_hash_move_forward(Z_ARRVAL_P(list_hash));
--- /dev/null
+--TEST--
+Bug #37812 (aggregate_methods_by_list fails to take certain methods)
+--FILE--
+<?php
+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 '<pre>Aggregation:'.print_r(aggregation_info($this),1).'</pre>';
+ }
+}
+new User;
+?>
+--EXPECT--
+<pre>Aggregation:Array
+(
+ [absorber] => Array
+ (
+ [methods] => Array
+ (
+ [0] => absorb
+ )
+
+ [properties] => Array
+ (
+ )
+
+ )
+
+)
+</pre>
+