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/formatter | |
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/formatter')
-rwxr-xr-x | ext/intl/formatter/formatter_class.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index 43d4d741d5..fb61a758c1 100755 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -25,6 +25,7 @@ #include "formatter_attr.h" zend_class_entry *NumberFormatter_ce_ptr = NULL; +static zend_object_handlers NumberFormatter_handlers; /* * Auxiliary functions needed by objects of 'NumberFormatter' class @@ -69,7 +70,7 @@ zend_object_value NumberFormatter_object_create( (zend_objects_free_object_storage_t)NumberFormatter_object_free, NULL TSRMLS_CC ); - retval.handlers = zend_get_std_object_handlers(); + retval.handlers = &NumberFormatter_handlers; return retval; } @@ -171,6 +172,10 @@ void formatter_register_class( TSRMLS_D ) ce.create_object = NumberFormatter_object_create; NumberFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); + memcpy(&NumberFormatter_handlers, zend_get_std_object_handlers(), + sizeof NumberFormatter_handlers); + NumberFormatter_handlers.clone_obj = NULL; + /* Declare 'NumberFormatter' class properties. */ if( !NumberFormatter_ce_ptr ) { |