From 118d5a7d5b5abe3d38ddd4a61ba7bc6992142cce Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 8 Nov 2004 13:42:53 +0000 Subject: [PATCH] - Fix constructors - This fixes exceptions in spl --- ext/spl/spl_functions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index ed7c3da3eae..143f55cc1f1 100755 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -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; + } } /* }}} */