Browse Source

ZF-11019: Caching URIs with "0" as the file name

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23691 44c647ce-9c0f-0410-b52a-842ac1e357ba
mabe 15 năm trước cách đây
mục cha
commit
e577ed551e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      library/Zend/Cache/Backend/Static.php

+ 2 - 2
library/Zend/Cache/Backend/Static.php

@@ -308,7 +308,7 @@ class Zend_Cache_Backend_Static
         } else {
             $extension = $this->_options['file_extension'];
         }
-        if (empty($fileName)) {
+        if ($fileName === '') {
             $fileName = $this->_options['index_filename'];
         }
         $pathName = $this->_options['public_dir'] . dirname($id);
@@ -333,7 +333,7 @@ class Zend_Cache_Backend_Static
             Zend_Cache::throwException('Invalid cache id: does not match expected public_dir path');
         }
         $fileName = basename($id);
-        if (empty($fileName)) {
+        if ($fileName === '') {
             $fileName = $this->_options['index_filename'];
         }
         $pathName  = $this->_options['public_dir'] . dirname($id);