Просмотр исходного кода

Fix ZF-12177. Patch by Martin Hujer

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24810 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 лет назад
Родитель
Сommit
d41b4a86ff
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      library/Zend/Config/Json.php

+ 3 - 1
library/Zend/Config/Json.php

@@ -220,7 +220,9 @@ class Zend_Config_Json extends Zend_Config
     {
         foreach ($this->_getConstants() as $constant) {
             if (strstr($value, $constant)) {
-                $value = str_replace($constant, constant($constant), $value);
+                // handle backslashes that may represent windows path names for instance
+                $replacement = str_replace('\\', '\\\\', constant($constant));
+                $value = str_replace($constant, $replacement, $value);
             }
         }
         return $value;