diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-26 13:47:19 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-26 13:47:19 +0200 |
commit | 91c4abcfcc059e791b26733725b453b2bf230411 (patch) | |
tree | 9b33b2a1b69f9de77bdc368e68f438a0eeb416e7 /Zend/zend_operators.c | |
parent | 99c67804d5a68ea374085e3f0ce21b85047c58eb (diff) | |
parent | ab938d7bbc3c738337e3c76c2a9c2f676e4fb16e (diff) | |
download | php-git-91c4abcfcc059e791b26733725b453b2bf230411.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
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 cd857ee217..ef778ea100 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1193,12 +1193,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 { @@ -1206,6 +1212,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 { |