]> granicus.if.org Git - php/commitdiff
- Fix constructors
authorMarcus Boerger <helly@php.net>
Mon, 8 Nov 2004 13:42:53 +0000 (13:42 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 8 Nov 2004 13:42:53 +0000 (13:42 +0000)
- This fixes exceptions in spl

ext/spl/spl_functions.c

index ed7c3da3eaeed12d52d208b44a5bb1aa62d2c24e..143f55cc1f19f229295bd90507949270da1bef83 100755 (executable)
@@ -75,7 +75,11 @@ void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_
        *ppce = zend_register_internal_class_ex(&ce, parent_ce, NULL TSRMLS_CC);
 
        /* entries changed by initialize */
-       (*ppce)->create_object = obj_ctor;
+       if (obj_ctor) {
+               (*ppce)->create_object = obj_ctor;
+       } else {
+               (*ppce)->create_object = parent_ce->create_object;
+       }
 }
 /* }}} */