mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixes
This commit is contained in:
parent
6dadb1b0ef
commit
6caf1d4585
2 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue