diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 04eeb9f9a..816cc01cf 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -778,13 +778,13 @@ class View extends Object { if ($name{0} !== '/' && strpos($name, '..') === false) { $name = $this->viewPath . DS . $subDir . Inflector::underscore($name); } elseif ($name{0} === '/') { + if (is_file($name)) { + return $name; + } $name = trim($name, '/'); if (DS !== '/') { $name = implode(DS, explode('/', $name)); } - if (is_file($name)) { - return $name; - } } elseif (strpos($name, '..') !== false) { $name = explode('/', $name); $i = array_search('..', $name);