diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2019-11-19 08:58:48 -0500 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-11-20 00:11:51 +0300 |
commit | f7c44ef2a0e1e1e5bed5527b8899c66b00416f43 (patch) | |
tree | 5d9294ab80623e32f4b129395f8cc4a5d0873750 | |
parent | e2a8cc0114849ec7eff4ef74eb21778523c184f1 (diff) | |
download | php-git-f7c44ef2a0e1e1e5bed5527b8899c66b00416f43.tar.gz |
Make opcache infer array_key_exists is non-null bool
array_key_exists now throws a TypeError instead of returning null
for invalid arguments after 14bdb0cfc7b62205c75f6d5c783e343259796776
-rw-r--r-- | ext/opcache/Optimizer/zend_inference.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index cb31ea21f2..975853a9eb 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2480,14 +2480,8 @@ static int zend_update_type_info(const zend_op_array *op_array, case ZEND_ISSET_ISEMPTY_STATIC_PROP: case ZEND_ASSERT_CHECK: case ZEND_IN_ARRAY: - UPDATE_SSA_TYPE(MAY_BE_FALSE|MAY_BE_TRUE, ssa_ops[i].result_def); - break; case ZEND_ARRAY_KEY_EXISTS: - tmp = MAY_BE_FALSE|MAY_BE_TRUE; - if (t2 & ((MAY_BE_ANY|MAY_BE_UNDEF) - (MAY_BE_ARRAY|MAY_BE_OBJECT))) { - tmp |= MAY_BE_NULL; - } - UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); + UPDATE_SSA_TYPE(MAY_BE_FALSE|MAY_BE_TRUE, ssa_ops[i].result_def); break; case ZEND_CAST: if (ssa_ops[i].op1_def >= 0) { |