diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-07-09 11:57:42 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-07-09 11:57:42 +0400 |
commit | 1dd07d6bf438a6a60f2fefcdd7e5c45045ef88f9 (patch) | |
tree | 9819118878bd35afd815a7aad1ea84da8e6b50bc /ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | |
parent | ca414c69040c66642b38d9f3aebe343265adc3f5 (diff) | |
download | php-git-1dd07d6bf438a6a60f2fefcdd7e5c45045ef88f9.tar.gz |
Partial fix that allows internal constructors to set $this to null.
The address of $this passed to drectly called internal constructor in execute_data->return_value.
Internal constructors should use ZEND_CTOR_MAKE_NULL() macro (insted of previous ZEND_NULL(EG(This))) to do the work.
This patch doesn't fix the problem for indirectly called constructors. e.g. parant::__construct().
Diffstat (limited to 'ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp')
-rw-r--r-- | ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index e171cf76ab..50df1a61ab 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -105,6 +105,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct) if (Z_TYPE_P(return_value) == IS_OBJECT && Z_OBJ_P(return_value) == NULL) { zend_object_store_ctor_failed(Z_OBJ(orig_this) TSRMLS_CC); zval_dtor(&orig_this); + ZEND_CTOR_MAKE_NULL(); } } |