Преглед изворни кода

ZF-10421: Zend_Cache_Backend_Static: cache_directory_umask wasn't converted by octdec

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22949 44c647ce-9c0f-0410-b52a-842ac1e357ba
mabe пре 15 година
родитељ
комит
5e32b05241
1 измењених фајлова са 2 додато и 13 уклоњено
  1. 2 13
      library/Zend/Cache/Backend/Static.php

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

@@ -262,21 +262,10 @@ class Zend_Cache_Backend_Static
     protected function _createDirectoriesFor($path)
     {
         if ( !is_dir($path)
-          && !@mkdir($path, $this->_options['cache_directory_umask'], true)) {
+          && !@mkdir($path, $this->_octdec($this->_options['cache_directory_umask']), true)) {
             $lastErr = error_get_last();
             Zend_Cache::throwException("Can't create directory: {$lastErr['message']}");
         }
-
-        /*
-        $parts = explode('/', $path);
-        $directory = '';
-        foreach ($parts as $part) {
-            $directory = rtrim($directory, '/') . '/' . $part;
-            if (!is_dir($directory)) {
-                mkdir($directory, $this->_octdec($this->_options['cache_directory_umask']));
-            }
-        }
-        */
     }
 
     /**
@@ -550,7 +539,7 @@ class Zend_Cache_Backend_Static
      */
     protected function _octdec($val)
     {
-        if (decoct(octdec($val)) == $val && is_string($val)) {
+        if (is_string($val) && decoct(octdec($val)) == $val) {
             return octdec($val);
         }
         return $val;