Merge branch '2.x' into 3.x

* 2.x:
  Handle opcache_invalidate() being disabled on shared hosting platforms
This commit is contained in:
Fabien Potencier
2019-08-21 07:13:11 +02:00
+1 -1
View File
@@ -64,7 +64,7 @@ class FilesystemCache implements CacheInterface
if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
// Compile cached file into bytecode cache
if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
opcache_invalidate($key, true);
@opcache_invalidate($key, true);
} elseif (\function_exists('apc_compile_file')) {
apc_compile_file($key);
}