Procházet zdrojové kódy

ZF-11100: Zend_Cache_Frontend_File: should check to see if file exists first

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23792 44c647ce-9c0f-0410-b52a-842ac1e357ba
mabe před 15 roky
rodič
revize
27e2d5a3cb
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      library/Zend/Cache/Frontend/File.php

+ 5 - 1
library/Zend/Cache/Frontend/File.php

@@ -110,7 +110,11 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
         clearstatcache();
         $i = 0;
         foreach ($masterFiles as $masterFile) {
-            $mtime = @filemtime($masterFile);
+            if (file_exists($masterFile)) {
+                $mtime = filemtime($masterFile);
+            } else {
+                $mtime = false;
+            }
 
             if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {
                 Zend_Cache::throwException('Unable to read master_file : ' . $masterFile);