summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-09-09 23:25:54 +0300
committerDmitry Stogov <dmitry@zend.com>2020-09-09 23:25:54 +0300
commit1c59bd5caaf6b644559e293fe6fb6969727312d6 (patch)
tree5f82bb3d27e8b9ad5a30d9e6a9581f8e900eab41
parent3375374c3338381ba79039a1ed0f796ef7d5cc9c (diff)
downloadphp-git-1c59bd5caaf6b644559e293fe6fb6969727312d6.tar.gz
Avoid more exception checks
-rw-r--r--ext/opcache/Optimizer/zend_inference.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index ed18c85e2b..5e1c0013b4 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -4292,6 +4292,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze
case ZEND_UNSET_CV:
case ZEND_ISSET_ISEMPTY_CV:
case ZEND_MAKE_REF:
+ case ZEND_FETCH_DIM_W:
break;
default:
/* undefined variable warning */
@@ -4633,7 +4634,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze
return 0;
case ZEND_FETCH_DIM_W:
case ZEND_FETCH_LIST_W:
- if ((t1 & (MAY_BE_ANY|MAY_BE_REF)) != MAY_BE_ARRAY) {
+ if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) {
return 1;
}
if (t2 & (MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT)) {