diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 19:06:59 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 19:48:59 -0500 |
commit | b965bab9f143edceec285bf56b681c839b02f288 (patch) | |
tree | 360be22a45b55311665d19e870487bc9a3639706 /Zend/zend_exceptions.c | |
parent | 64b167d201e567ec213b5aa37c66536621835331 (diff) | |
download | php-git-b965bab9f143edceec285bf56b681c839b02f288.tar.gz |
Fix handler double copy.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r-- | Zend/zend_exceptions.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 484fcdca60..96e426130e 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -767,10 +767,11 @@ void zend_register_default_exception(void) /* {{{ */ INIT_CLASS_ENTRY(ce, "Exception", default_exception_functions); default_exception_ce = zend_register_internal_class_ex(&ce, NULL); default_exception_ce->create_object = zend_default_exception_new; + zend_class_implements(default_exception_ce, 1, zend_ce_throwable); + memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); default_exception_handlers.clone_obj = NULL; - zend_class_implements(default_exception_ce, 1, zend_ce_throwable); - + zend_declare_property_string(default_exception_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); zend_declare_property_string(default_exception_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); @@ -787,10 +788,8 @@ void zend_register_default_exception(void) /* {{{ */ INIT_CLASS_ENTRY(ce, "Error", default_exception_functions); error_ce = zend_register_internal_class_ex(&ce, NULL); error_ce->create_object = zend_default_exception_new; - memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - default_exception_handlers.clone_obj = NULL; zend_class_implements(error_ce, 1, zend_ce_throwable); - + zend_declare_property_string(error_ce, "message", sizeof("message")-1, "", ZEND_ACC_PROTECTED); zend_declare_property_string(error_ce, "string", sizeof("string")-1, "", ZEND_ACC_PRIVATE); zend_declare_property_long(error_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED); |