Permalink
Browse files

Fix caching of paths when a plugin param is used.

Plugin paths should not be cached as it makes subsequent look-ups
behave incorrectly.
  • Loading branch information...
1 parent 69b1c33 commit 0b9b23fe3839e502542f9b7709c8de4b29782af8 @markstory markstory committed with markstory Dec 24, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Cake/View/View.php
View
@@ -1007,7 +1007,10 @@ protected function _paths($plugin = null, $cached = true) {
$paths = array_merge($paths, App::path('View', $plugin));
}
- $this->_paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths)));
- return $this->_paths;
+ $paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths)));
+ if ($plugin !== null) {
+ return $paths;
+ }
+ return $this->_paths = $paths;
}
}

0 comments on commit 0b9b23f

Please sign in to comment.