Skip to content

Commit da8ce17

Browse files
committed
This forces a better error message for non working clone calls.
1 parent cad49f1 commit da8ce17

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

Zend/zend_default_classes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static void zend_register_default_exception(TSRMLS_D)
390390
default_exception_ptr = zend_register_internal_class(&ce TSRMLS_CC);
391391
default_exception_ptr->create_object = zend_default_exception_new;
392392
memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
393+
default_exception_handlers.clone_obj = NULL;
393394
default_exception_handlers.cast_object = zend_cast_exception;
394395

395396
zend_declare_property_string(default_exception_ptr, "message", sizeof("message")-1, "Unknown exception", ZEND_ACC_PROTECTED TSRMLS_CC);

Zend/zend_exceptions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static void zend_register_default_exception(TSRMLS_D)
390390
default_exception_ptr = zend_register_internal_class(&ce TSRMLS_CC);
391391
default_exception_ptr->create_object = zend_default_exception_new;
392392
memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
393+
default_exception_handlers.clone_obj = NULL;
393394
default_exception_handlers.cast_object = zend_cast_exception;
394395

395396
zend_declare_property_string(default_exception_ptr, "message", sizeof("message")-1, "Unknown exception", ZEND_ACC_PROTECTED TSRMLS_CC);

Zend/zend_reflection_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,7 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
30393039
zend_class_entry _reflection_entry;
30403040

30413041
memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
3042+
reflection_object_handlers.clone_obj = NULL;
30423043

30433044
INIT_CLASS_ENTRY(_reflection_entry, "reflection_exception", reflection_exception_functions);
30443045
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);

ext/reflection/php_reflection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,7 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
30393039
zend_class_entry _reflection_entry;
30403040

30413041
memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
3042+
reflection_object_handlers.clone_obj = NULL;
30423043

30433044
INIT_CLASS_ENTRY(_reflection_entry, "reflection_exception", reflection_exception_functions);
30443045
reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);

0 commit comments

Comments
 (0)