Skip to content

Commit 237c1bf

Browse files
committed
Merge branch 'PHP-5.6'
2 parents 44dcdd1 + 363ff60 commit 237c1bf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Zend/zend_operators.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,12 +1026,14 @@ ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
10261026
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_POW);
10271027

10281028
if (Z_TYPE_P(op1) == IS_ARRAY) {
1029-
ZVAL_LONG(op1, 0);
1029+
ZVAL_LONG(result, 0);
1030+
return SUCCESS;
10301031
} else {
10311032
zendi_convert_scalar_to_number(op1, op1_copy, result);
10321033
}
10331034
if (Z_TYPE_P(op2) == IS_ARRAY) {
1034-
ZVAL_LONG(op2, 0);
1035+
ZVAL_LONG(result, 1L);
1036+
return SUCCESS;
10351037
} else {
10361038
zendi_convert_scalar_to_number(op2, op2_copy, result);
10371039
}

ext/standard/tests/math/pow_variation2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ float(1)
145145
float(1)
146146

147147
-- Iteration 19 --
148-
float(1)
148+
int(1)
149149

150150
-- Iteration 20 --
151151
float(1)
@@ -169,4 +169,4 @@ float(1)
169169

170170
-- Iteration 26 --
171171
%s
172-
===Done===
172+
===Done===

0 commit comments

Comments
 (0)