summaryrefslogtreecommitdiff
path: root/ext/spl/spl_functions.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-11-08 13:42:53 +0000
committerMarcus Boerger <helly@php.net>2004-11-08 13:42:53 +0000
commit118d5a7d5b5abe3d38ddd4a61ba7bc6992142cce (patch)
tree113ddeb49ba9f8d71bdc883ee16d98f1a061803d /ext/spl/spl_functions.c
parentcb16f5e815333a2e5e277820aa223b94bec7cf65 (diff)
downloadphp-git-118d5a7d5b5abe3d38ddd4a61ba7bc6992142cce.tar.gz
- Fix constructors
- This fixes exceptions in spl
Diffstat (limited to 'ext/spl/spl_functions.c')
-rwxr-xr-xext/spl/spl_functions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index ed7c3da3ea..143f55cc1f 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;
+ }
}
/* }}} */