summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-06-20 09:04:14 +0300
committerDmitry Stogov <dmitry@zend.com>2019-06-20 09:04:14 +0300
commitcd6a6e4cf2677bfbe2a21164239737eb22bd4da6 (patch)
treeff65c779d5544baea8172fe6277c5de78333c3ec
parent82021ad9df832a99976a48d35119c6284a7831cf (diff)
downloadphp-git-cd6a6e4cf2677bfbe2a21164239737eb22bd4da6.tar.gz
Fixed bug #78185 (File cache no longer works)
-rw-r--r--NEWS3
-rw-r--r--ext/opcache/ZendAccelerator.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 2f11c32f3d..fe94306587 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ PHP NEWS
- Date:
. Fixed #69044 (discrepency between time and microtime). (krakjoe)
+- Opcache:
+ . Fixed bug #78185 (File cache no longer works). (Dmitry)
+
27 Jun 2019, PHP 7.2.20
- Core:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 70508b6b05..b6c001d637 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1772,6 +1772,13 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
/* The Accelerator is disabled, act as if without the Accelerator */
ZCG(cache_opline) = NULL;
ZCG(cache_persistent_script) = NULL;
+#ifdef HAVE_OPCACHE_FILE_CACHE
+ if (file_handle->filename
+ && ZCG(accel_directives).file_cache
+ && ZCG(enabled) && accel_startup_ok) {
+ return file_cache_compile_file(file_handle, type);
+ }
+#endif
return accelerator_orig_compile_file(file_handle, type);
#ifdef HAVE_OPCACHE_FILE_CACHE
} else if (file_cache_only) {