]> granicus.if.org Git - php/commitdiff
Fixed MAY_BE_INDIRECT inference.
authorDmitry Stogov <dmitry@zend.com>
Mon, 26 Oct 2020 18:48:13 +0000 (21:48 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 26 Oct 2020 18:48:13 +0000 (21:48 +0300)
ext/opcache/Optimizer/zend_inference.c

index 1bcce64a28a5a0536da32de5cbc65b537710c8e3..e5a5cd5444359d730f0580d6206668aac10621e1 100644 (file)
@@ -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) {