Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing plugin path replacement in \core\Libraries from optimizations

  • Loading branch information...
commit 22331d601c004050268bba3a7fd29f8ff11a595f 1 parent 2b5e385
@gwoo gwoo authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 libraries/lithium/core/Libraries.php
View
5 libraries/lithium/core/Libraries.php
@@ -626,7 +626,10 @@ protected static function _locatePath($type, $params) {
return null;
}
foreach (static::$_paths[$type] as $path) {
- if (is_dir($path = str_replace(array_keys($params), array_values($params), $path))) {
+ $replace = array_merge(array_keys($params), array('{', '}', ':'));
+ $with = array_merge(array_values($params), array('', '', ''));
+
+ if (is_dir($path = str_replace($replace, $with, $path))) {
return $path;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.