Cleanup: avoid useless array duplication

This commit is contained in:
Dmitry Stogov 2015-09-25 02:20:05 +03:00
parent 01d5beddf4
commit c21d18ef95

View File

@ -1674,12 +1674,10 @@ SPL_METHOD(Array, serialize)
rebuild_object_properties(&intern->std);
}
ZVAL_ARR(&members, zend_array_dup(intern->std.properties));
ZVAL_ARR(&members, intern->std.properties);
php_var_serialize(&buf, &members, &var_hash); /* finishes the string */
zval_ptr_dtor(&members);
/* done */
PHP_VAR_SERIALIZE_DESTROY(var_hash);