Use object pointers instead of handles

This commit is contained in:
Dmitry Stogov 2015-02-04 12:01:55 +03:00
parent afcaa52c73
commit 2428fd1c8b

View file

@ -608,7 +608,7 @@ static void json_encode_serializable_object(smart_str *buf, zval *val, int optio
} }
if ((Z_TYPE(retval) == IS_OBJECT) && if ((Z_TYPE(retval) == IS_OBJECT) &&
(Z_OBJ_HANDLE(retval) == Z_OBJ_HANDLE_P(val))) { (Z_OBJ(retval) == Z_OBJ_P(val))) {
/* Handle the case where jsonSerialize does: return $this; by going straight to encode array */ /* Handle the case where jsonSerialize does: return $this; by going straight to encode array */
json_encode_array(buf, &retval, options); json_encode_array(buf, &retval, options);
} else { } else {