summaryrefslogtreecommitdiff
path: root/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-07-09 11:57:42 +0400
committerDmitry Stogov <dmitry@zend.com>2014-07-09 11:57:42 +0400
commit1dd07d6bf438a6a60f2fefcdd7e5c45045ef88f9 (patch)
tree9819118878bd35afd815a7aad1ea84da8e6b50bc /ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
parentca414c69040c66642b38d9f3aebe343265adc3f5 (diff)
downloadphp-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.cpp1
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();
}
}