]> granicus.if.org Git - php/commitdiff
Fix dynamic func def persist with preloading
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 4 Mar 2021 15:15:05 +0000 (16:15 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 4 Mar 2021 15:15:05 +0000 (16:15 +0100)
If we find an existing serialization of the op_array, of course
we also need to actually make use of it...

ext/opcache/zend_persist.c

index 6688e473cb70fbea922df00019ead50f9bd0ea13..19bc1ce7adcd5ab6d643b0a15a4da6542f4117f7 100644 (file)
@@ -704,6 +704,7 @@ static void zend_persist_op_array(zval *zv)
                }
        } else {
                /* This can happen during preloading, if a dynamic function definition is declared. */
+               Z_PTR_P(zv) = old_op_array;
        }
 }