]> granicus.if.org Git - php/commitdiff
Fixed type-info for ZEND_FETCH_DIIM_UNSET
authorXinchen Hui <laruence@gmail.com>
Sat, 19 Aug 2017 10:48:10 +0000 (18:48 +0800)
committerXinchen Hui <laruence@gmail.com>
Sat, 19 Aug 2017 10:48:10 +0000 (18:48 +0800)
ext/opcache/Optimizer/zend_inference.c

index 9d5d6cfea54065a7efce0f4edac7d1ae39d3ae5d..39ff7d8d49d424d7343d01fbf0bca90b42c1c640 100644 (file)
@@ -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) {