Index: Zend/zend_compile.c =================================================================== RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.647.2.27.2.41.2.50 diff -u -p -d -r1.647.2.27.2.41.2.50 zend_compile.c --- Zend/zend_compile.c 16 Mar 2008 21:05:33 -0000 1.647.2.27.2.41.2.50 +++ Zend/zend_compile.c 17 Mar 2008 10:21:20 -0000 @@ -2197,10 +2197,11 @@ static void do_inherit_parent_constructo lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length); if (!zend_hash_exists(&ce->function_table, lc_class_name, ce->name_length+1)) { lc_parent_class_name = zend_str_tolower_dup(ce->parent->name, ce->parent->name_length); - if (zend_hash_find(&ce->parent->function_table, lc_parent_class_name, ce->parent->name_length+1, (void **)&function)==SUCCESS) { + if (!zend_hash_exists(&ce->function_table, lc_parent_class_name, ce->parent->name_length+1) && + zend_hash_find(&ce->parent->function_table, lc_parent_class_name, ce->parent->name_length+1, (void **)&function)==SUCCESS) { if (function->common.fn_flags & ZEND_ACC_CTOR) { /* inherit parent's constructor */ - zend_hash_update(&ce->function_table, lc_class_name, ce->name_length+1, function, sizeof(zend_function), NULL); + zend_hash_update(&ce->function_table, lc_parent_class_name, ce->parent->name_length+1, function, sizeof(zend_function), NULL); function_add_ref(function); } } Index: Zend/zend_object_handlers.c =================================================================== RCS file: /repository/ZendEngine2/zend_object_handlers.c,v retrieving revision 1.135.2.6.2.22.2.12 diff -u -p -d -r1.135.2.6.2.22.2.12 zend_object_handlers.c --- Zend/zend_object_handlers.c 21 Feb 2008 13:55:45 -0000 1.135.2.6.2.22.2.12 +++ Zend/zend_object_handlers.c 17 Mar 2008 10:21:20 -0000 @@ -892,9 +892,17 @@ ZEND_API void zend_std_callstatic_user_c ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */ { - zend_function *fbc; + zend_function *fbc = NULL; + char *lc_class_name; - if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen + 1, (void **) &fbc)==FAILURE) { + if (function_name_strlen == ce->name_length) { + lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length); + if (!memcmp(lc_class_name, function_name_strval, function_name_strlen) && ce->constructor) { + fbc = ce->constructor; + } + efree(lc_class_name); + } + if (!fbc && zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &fbc)==FAILURE) { if (ce->__call && EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry &&