From: Xinchen Hui <laruence@gmail.com>
Date: Sat, 19 Aug 2017 10:48:10 +0000 (+0800)
Subject: Fixed type-info for ZEND_FETCH_DIIM_UNSET
X-Git-Tag: php-7.2.0RC1~34
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea0df0739837f5df33c3fbae6c3f6ad5090086e3;p=php

Fixed type-info for ZEND_FETCH_DIIM_UNSET
---

diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 9d5d6cfea5..39ff7d8d49 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -3004,6 +3004,13 @@ static int zend_update_type_info(const zend_op_array *op_array,
 							tmp |= MAY_BE_ARRAY_KEY_STRING;
 						}
 					}
+				} else if (opline->opcode == ZEND_FETCH_DIM_UNSET) {
+					if (t1 & MAY_BE_ARRAY) {
+						tmp |= MAY_BE_RC1;
+					}
+					if (t1 & MAY_BE_OBJECT) {
+						tmp |= t1 & MAY_BE_RCN;
+					}
 				}
 				j = ssa_vars[ssa_ops[i].result_def].use_chain;
 				while (j >= 0) {