Skip to content

Commit 0b9b23f

Browse files
committed
Fix caching of paths when a plugin param is used.
Plugin paths should not be cached as it makes subsequent look-ups behave incorrectly.
1 parent 69b1c33 commit 0b9b23f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Cake/View/View.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,10 @@ protected function _paths($plugin = null, $cached = true) {
10071007
$paths = array_merge($paths, App::path('View', $plugin));
10081008
}
10091009

1010-
$this->_paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths)));
1011-
return $this->_paths;
1010+
$paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths)));
1011+
if ($plugin !== null) {
1012+
return $paths;
1013+
}
1014+
return $this->_paths = $paths;
10121015
}
10131016
}

0 commit comments

Comments
 (0)