diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-26 13:50:02 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-26 13:50:02 +0200 |
| commit | 8686a3d30b46f2f2568386b0c33d59c6b3b869bd (patch) | |
| tree | ff82ac1bf5df27a42d5ba1a7444e7e955fb02ed1 /Zend/zend_operators.c | |
| parent | 7e295da81c83e0e059684567889cf1ff09b3693e (diff) | |
| parent | d71f859a56757df16e20d72b22366a02ff9fec54 (diff) | |
| download | php-git-8686a3d30b46f2f2568386b0c33d59c6b3b869bd.tar.gz | |
Merge branch 'PHP-7.4'
Diffstat (limited to 'Zend/zend_operators.c')
| -rw-r--r-- | Zend/zend_operators.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 621e26c94b..04ee310f7a 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1199,12 +1199,18 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* { if (EXPECTED(op1 != op2)) { if (Z_TYPE_P(op1) == IS_ARRAY) { + if (op1 == result) { + zval_ptr_dtor(result); + } ZVAL_LONG(result, 0); return SUCCESS; } else { op1 = zendi_convert_scalar_to_number(op1, &op1_copy, result, 0); } if (Z_TYPE_P(op2) == IS_ARRAY) { + if (op1 == result) { + zval_ptr_dtor(result); + } ZVAL_LONG(result, 1L); return SUCCESS; } else { @@ -1212,6 +1218,9 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* { } } else { if (Z_TYPE_P(op1) == IS_ARRAY) { + if (op1 == result) { + zval_ptr_dtor(result); + } ZVAL_LONG(result, 0); return SUCCESS; } else { |
