mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Allow is_ref to become 0 in case the refcount is back to 1.
This commit is contained in:
parent
5c3917478a
commit
4585f7bf1f
2 changed files with 5 additions and 1 deletions
|
@ -217,9 +217,11 @@ ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
|
|||
if ((*zval_ptr)->refcount==0) {
|
||||
zval_dtor(*zval_ptr);
|
||||
safe_free_zval_ptr(*zval_ptr);
|
||||
} else if ((*zval_ptr)->refcount == 1) {
|
||||
(*zval_ptr)->is_ref = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ZEND_API inline int i_zend_is_true(zval *op)
|
||||
{
|
||||
|
|
|
@ -313,9 +313,11 @@ void pass_include_eval(zend_op_array *op_array)
|
|||
while (opline<end) {
|
||||
if (opline->op1.op_type==IS_CONST) {
|
||||
opline->op1.u.constant.is_ref = 1;
|
||||
opline->op1.u.constant.refcount = 2; /* Make sure is_ref won't be reset */
|
||||
}
|
||||
if (opline->op2.op_type==IS_CONST) {
|
||||
opline->op2.u.constant.is_ref = 1;
|
||||
opline->op2.u.constant.refcount = 2;
|
||||
}
|
||||
opline++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue