From: Dmitry Stogov Date: Mon, 26 Oct 2020 18:48:13 +0000 (+0300) Subject: Fixed MAY_BE_INDIRECT inference. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7df636589d6e9039b9f78b9295169e011fa630c;p=php Fixed MAY_BE_INDIRECT inference. --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 1bcce64a28..e5a5cd5444 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -1984,6 +1984,9 @@ uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int } if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) { tmp |= MAY_BE_NULL; + if (write) { + tmp |= MAY_BE_INDIRECT; + } } if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE)) { if (!write) {