This commit is contained in:
Andrea Faulds 2016-03-20 21:18:33 +00:00
parent 6dadb1b0ef
commit 6caf1d4585
2 changed files with 1 additions and 2 deletions

View file

@ -6246,7 +6246,7 @@ ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode,
}
/* While basic arithmetic operators always produce numeric string errors,
* bitwise operators only produce errors when *both* operands are strings */
* bitwise operators don't produce errors if both operands are strings */
if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)
&& Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) {
return 0;

View file

@ -779,7 +779,6 @@ try_again:
return zend_dval_to_lval_cap(dval);
}
}
return ZEND_STRTOL(Z_STRVAL_P(op), NULL, 10);
case IS_ARRAY:
return zend_hash_num_elements(Z_ARRVAL_P(op)) ? 1 : 0;
case IS_OBJECT: