Permalink
Browse files

pluginSplit for a more meaningful exception message

  • Loading branch information...
1 parent 6f5ff4d commit c83b4549464a54605d22e9198ac9048304e175e7 @dereuromark dereuromark committed Dec 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/View/View.php
View
@@ -414,7 +414,9 @@ public function element($name, $data = array(), $options = array()) {
}
if (empty($options['ignoreMissing'])) {
- $file = 'Elements' . DS . $name . $this->ext;
+ list ($plugin, $name) = pluginSplit($name, true);
+ $name = str_replace('/', DS, $name);
+ $file = $plugin . 'Elements' . DS . $name . $this->ext;
trigger_error(__d('cake_dev', 'Element Not Found: %s', $file), E_USER_NOTICE);
}
}

0 comments on commit c83b454

Please sign in to comment.