Skip to content

Commit

Permalink
Fix caching of paths when a plugin param is used.
Browse files Browse the repository at this point in the history
Plugin paths should not be cached as it makes subsequent look-ups
behave incorrectly.
  • Loading branch information
markstory committed Dec 28, 2011
1 parent 69b1c33 commit 0b9b23f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Cake/View/View.php
Expand Up @@ -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.