]> granicus.if.org Git - php/commitdiff
Fixed bug #78185 (File cache no longer works)
authorDmitry Stogov <dmitry@zend.com>
Thu, 20 Jun 2019 06:04:14 +0000 (09:04 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 20 Jun 2019 06:04:14 +0000 (09:04 +0300)
NEWS
ext/opcache/ZendAccelerator.c

diff --git a/NEWS b/NEWS
index 2f11c32f3d1bca779c1ea38c8d20e5b1275bc0bf..fe943065870c5c97b6afbe50b7f2ea0acf386d8f 100644 (file)
--- 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:
index 70508b6b05a2cb7538506c10a476407df4c2b322..b6c001d63712d9f2ae80a8ae4b3992387467dcf8 100644 (file)
@@ -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) {