Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

throw an exception if the view you try to extend doesn't exist

or element, or layout
  • Loading branch information...
commit def96c0460b0c411ad5c17b959c50d2d7b91cc0d 1 parent 4f1be12
@AD7six AD7six authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/View/View.php
View
4 lib/Cake/View/View.php
@@ -679,6 +679,10 @@ public function extend($name) {
break;
}
+
+ if (!$parent) {
+ throw new LogicException(__d('cake_dev', 'The parent %s you specified doesn\'t exist.', $this->_currentType));
+ }
if ($parent == $this->_current) {
throw new LogicException(__d('cake_dev', 'You cannot have views extend themselves.'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.