diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-12-27 01:10:08 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-12-27 01:10:08 +0000 |
commit | 610bb960361a4d0bde6ca589bd7163bd6bfccb65 (patch) | |
tree | 55d25bf59d6c2c3c4181bb0893a22bdfb59674b9 /ext/intl/msgformat/msgformat_class.c | |
parent | 83ef8850a056ee9103c2878e8c3e23337012c6d7 (diff) | |
download | php-git-610bb960361a4d0bde6ca589bd7163bd6bfccb65.tar.gz |
- Fixed bug #53612 (Segmentation fault when using several cloned intl
objects).
Diffstat (limited to 'ext/intl/msgformat/msgformat_class.c')
-rwxr-xr-x | ext/intl/msgformat/msgformat_class.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c index 28906d4e4c..522d59060c 100755 --- a/ext/intl/msgformat/msgformat_class.c +++ b/ext/intl/msgformat/msgformat_class.c @@ -25,6 +25,7 @@ #include "msgformat_attr.h" zend_class_entry *MessageFormatter_ce_ptr = NULL; +static zend_object_handlers MessageFormatter_handlers; /* * Auxiliary functions needed by objects of 'MessageFormatter' class @@ -66,7 +67,7 @@ zend_object_value MessageFormatter_object_create(zend_class_entry *ce TSRMLS_DC) (zend_objects_free_object_storage_t)MessageFormatter_object_free, NULL TSRMLS_CC ); - retval.handlers = zend_get_std_object_handlers(); + retval.handlers = &MessageFormatter_handlers; return retval; } @@ -135,6 +136,10 @@ void msgformat_register_class( TSRMLS_D ) ce.create_object = MessageFormatter_object_create; MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); + memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(), + sizeof MessageFormatter_handlers); + MessageFormatter_handlers.clone_obj = NULL; + /* Declare 'MessageFormatter' class properties. */ if( !MessageFormatter_ce_ptr ) { |