if ((short_class_name_length == name_len) && (!memcmp(short_class_name, lcname, name_len))) {
if (CG(active_class_entry)->constructor) {
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
+ } else {
+ CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
}
- CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
} else if ((name_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)))) {
if (CG(active_class_entry)->constructor) {
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);