Browse Source

Merge pull request #7989 from jeremyharris/issue-7986

Fixing class name and file path on controller exception
Mark Story 10 years ago
parent
commit
a2e976d69c
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/Template/Error/missing_controller.ctp

+ 3 - 4
src/Template/Error/missing_controller.ctp

@@ -14,7 +14,6 @@
  */
 use Cake\Core\Plugin;
 use Cake\Core\Configure;
-use Cake\Utility\Inflector;
 
 $pluginDot = empty($plugin) ? null : $plugin . '.';
 $namespace = Configure::read('App.namespace');
@@ -22,9 +21,9 @@ $prefixNs = '';
 $prefixPath = '';
 
 if (!empty($prefix)) {
-    $prefix = Inflector::camelize($prefix);
-    $prefixNs = '\\' . $prefix;
-    $prefixPath = $prefix . DS;
+    $prefix = array_map('\Cake\Utility\Inflector::camelize', explode('/', $prefix));
+    $prefixNs = '\\' . implode('\\', $prefix);
+    $prefixPath = implode(DS, $prefix) . DS;
 }
 
 if (!empty($plugin)) {