Fix bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)

This commit is contained in:
Jakub Zelenka 2016-03-20 15:53:57 +00:00
parent a175aa9dca
commit 7e069daa89
3 changed files with 22 additions and 1 deletions

View file

@ -1183,7 +1183,7 @@ ZEND_FUNCTION(get_object_vars)
zobj = Z_OBJ_P(obj);
if (!zobj->ce->default_properties_count && properties == zobj->properties) {
if (!zobj->ce->default_properties_count && properties == zobj->properties && !ZEND_HASH_GET_APPLY_COUNT(properties)) {
/* fast copy */
if (EXPECTED(zobj->handlers == &std_object_handlers)) {
if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) {