Keep original value of "prototype"

This commit is contained in:
Dmitry Stogov 2018-10-30 16:13:45 +03:00
parent 2fefa8c61e
commit bf38e6c10a

View file

@ -1561,9 +1561,11 @@ int zend_optimize_script(zend_script *script, zend_long optimization_level, zend
ZEND_ASSERT(orig_op_array != NULL);
if (orig_op_array != op_array) {
zend_function *prototype = op_array->prototype;
HashTable *ht = op_array->static_variables;
*op_array = *orig_op_array;
op_array->prototype = prototype;
op_array->static_variables = ht;
}
}