]> granicus.if.org Git - php/commitdiff
Fixed MAY_BE_INDIRECT inference
authorDmitry Stogov <dmitry@zend.com>
Mon, 16 Nov 2020 15:17:05 +0000 (18:17 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 16 Nov 2020 15:17:05 +0000 (18:17 +0300)
ext/opcache/Optimizer/zend_inference.c

index 9bb11096d891e6ba7ebcb01814e2618036ec0cb1..56180bfb4331b803a093b968235b5ffbad7b74f7 100644 (file)
@@ -1949,6 +1949,9 @@ uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int
                } else {
                        tmp |= MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
            }
+               if (write) {
+                       tmp |= MAY_BE_INDIRECT;
+               }
        }
        if (t1 & MAY_BE_ARRAY) {
                if (insert) {