Last active
December 4, 2017 13:18
-
-
Save laruence/589fa2242b6b2d926efd26ee91f5ee85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c | |
index ef82135..688d6a9 100644 | |
--- a/ext/opcache/Optimizer/zend_inference.c | |
+++ b/ext/opcache/Optimizer/zend_inference.c | |
@@ -2928,7 +2928,7 @@ static int zend_update_type_info(const zend_op_array *op_array, | |
break; | |
case ZEND_FE_FETCH_R: | |
case ZEND_FE_FETCH_RW: | |
- tmp = (t2 & MAY_BE_REF); | |
+ tmp = t2; | |
if (t1 & MAY_BE_OBJECT) { | |
if (opline->opcode == ZEND_FE_FETCH_RW) { | |
tmp |= MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; | |
@@ -2965,6 +2965,9 @@ static int zend_update_type_info(const zend_op_array *op_array, | |
tmp |= MAY_BE_STRING | MAY_BE_RCN; | |
} | |
} | |
+ if (!tmp) { | |
+ tmp = (ssa_ops[i].result_use >= 0) ? RES_USE_INFO() : 0; | |
+ } | |
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); | |
} | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment