Skip to content

Commit 446471b

Browse files
committed
Remove error suppression from zend_optimizer_eval_binary_op()
All error conditions should be handled by zend_binary_op_produces_error(). Pointed out by Girgias.
1 parent 555b187 commit 446471b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Zend/Optimizer/zend_optimizer.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,12 @@ void zend_optimizer_collect_constant(zend_optimizer_ctx *ctx, zval *name, zval*
5050

5151
int zend_optimizer_eval_binary_op(zval *result, zend_uchar opcode, zval *op1, zval *op2) /* {{{ */
5252
{
53-
binary_op_type binary_op = get_binary_op(opcode);
54-
int er, ret;
55-
5653
if (zend_binary_op_produces_error(opcode, op1, op2)) {
5754
return FAILURE;
5855
}
5956

60-
er = EG(error_reporting);
61-
EG(error_reporting) = 0;
62-
ret = binary_op(result, op1, op2);
63-
EG(error_reporting) = er;
64-
65-
return ret;
57+
binary_op_type binary_op = get_binary_op(opcode);
58+
return binary_op(result, op1, op2);
6659
}
6760
/* }}} */
6861

0 commit comments

Comments
 (0)