Index: Zend/zend_compile.c =================================================================== RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.647.2.27.2.19 diff -u -p -d -r1.647.2.27.2.19 zend_compile.c --- Zend/zend_compile.c 3 Oct 2006 11:10:33 -0000 1.647.2.27.2.19 +++ Zend/zend_compile.c 12 Oct 2006 13:05:24 -0000 @@ -1872,10 +1872,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.15 diff -u -p -d -r1.135.2.6.2.15 zend_object_handlers.c --- Zend/zend_object_handlers.c 12 Sep 2006 11:01:16 -0000 1.135.2.6.2.15 +++ Zend/zend_object_handlers.c 12 Oct 2006 13:05:25 -0000 @@ -823,9 +823,17 @@ static union _zend_function *zend_std_ge /* This is not (yet?) in the API, but it belongs in the built-in objects callbacks */ 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) { char *class_name = ce->name; if (!class_name) {