com php-src: Remove recursion checks from AO get_properties : ext/spl/spl_array.c
| From: | Nikita Popov | Date: | Wed, 24 Feb 2016 16:10:28 +0000 |
| Subject: | com php-src: Remove recursion checks from AO get_properties : ext/spl/spl_array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91151@lists.php.net to get a copy of this message | ||
Commit: 38db6ff306bd6fca4ed37823ea8abfeef3b9796c
Author: Nikita Popov <nikic@php.net> Wed, 24 Feb 2016 17:10:28 +0100
Parents: 3ea877ca15d1f41b310a932989fab8de25511718
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=38db6ff306bd6fca4ed37823ea8abfeef3b9796c
Log:
Remove recursion checks from AO get_properties
These are pointless, there is no recursion (of that kind) happening
there.
Changed paths:
M ext/spl/spl_array.c
Diff:
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 2ba2b92..366617f 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -798,11 +798,6 @@ SPL_METHOD(Array, getArrayCopy)
static HashTable *spl_array_get_properties(zval *object) /* {{{ */
{
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *result;
-
- if (intern->nApplyCount > 1) {
- php_error_docref(NULL, E_ERROR, "Nesting level too deep - recursive dependency?");
- }
if (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST) {
if (!intern->std.properties) {
@@ -811,10 +806,7 @@ static HashTable *spl_array_get_properties(zval *object) /* {{{ */
return intern->std.properties;
}
- intern->nApplyCount++;
- result = spl_array_get_hash_table(intern);
- intern->nApplyCount--;
- return result;
+ return spl_array_get_hash_table(intern);
} /* }}} */
static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */