diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index e5d7f650045c..99bb33573f3b 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4444,6 +4444,8 @@ static int accel_preload(const char *config, bool in_child) if (PG(auto_globals_jit)) { ping_auto_globals_mask = zend_accel_get_auto_globals(); + } else { + ping_auto_globals_mask = 0; } if (EG(zend_constants)) { diff --git a/ext/opcache/tests/preloading_no_auto_globals_jit.inc b/ext/opcache/tests/preloading_no_auto_globals_jit.inc new file mode 100644 index 000000000000..ad80df7733d1 --- /dev/null +++ b/ext/opcache/tests/preloading_no_auto_globals_jit.inc @@ -0,0 +1,6 @@ + +--FILE-- +count_global_server()); +?> +--EXPECTF-- +int(%d)