summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-02-20 02:32:29 +0300
committerDmitry Stogov <dmitry@zend.com>2019-02-20 02:32:29 +0300
commitf2e515e9eb78b09ecaed057241e7a43bf2d9f883 (patch)
tree6f4e0a659f6095a2b9d494669f26aeb080bce21f
parent555fb294ec4c1948b357ee43b6ca3c81873ddf26 (diff)
downloadphp-git-f2e515e9eb78b09ecaed057241e7a43bf2d9f883.tar.gz
Use ZEND_ACC_REUSE_GET_ITERATOR flag instead of run-time class modification
-rw-r--r--ext/spl/spl_fixedarray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 71548abf16..ce93f2aef5 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -227,7 +227,6 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z
while (parent) {
if (parent == spl_ce_SplFixedArray) {
intern->std.handlers = &spl_handler_SplFixedArray;
- class_type->get_iterator = spl_fixedarray_get_iterator;
break;
}
@@ -1087,6 +1086,7 @@ PHP_MINIT_FUNCTION(spl_fixedarray)
REGISTER_SPL_IMPLEMENTS(SplFixedArray, Countable);
spl_ce_SplFixedArray->get_iterator = spl_fixedarray_get_iterator;
+ spl_ce_SplFixedArray->ce_flags |= ZEND_ACC_REUSE_GET_ITERATOR;
return SUCCESS;
}