Skip to content

Commit 1c59bd5

Browse files
committed
Avoid more exception checks
1 parent 3375374 commit 1c59bd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4292,6 +4292,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze
42924292
case ZEND_UNSET_CV:
42934293
case ZEND_ISSET_ISEMPTY_CV:
42944294
case ZEND_MAKE_REF:
4295+
case ZEND_FETCH_DIM_W:
42954296
break;
42964297
default:
42974298
/* undefined variable warning */
@@ -4633,7 +4634,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze
46334634
return 0;
46344635
case ZEND_FETCH_DIM_W:
46354636
case ZEND_FETCH_LIST_W:
4636-
if ((t1 & (MAY_BE_ANY|MAY_BE_REF)) != MAY_BE_ARRAY) {
4637+
if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
46374638
return 1;
46384639
}
46394640
if (t2 & (MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT)) {

0 commit comments

Comments
 (0)