Skip to content
Browse files

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

or element, or layout
  • Loading branch information...
AD7six committed Jan 24, 2012
1 parent 4f1be12 commit def96c0460b0c411ad5c17b959c50d2d7b91cc0d
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/View/View.php
@@ -679,6 +679,10 @@ public function extend($name) {
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.'));

0 comments on commit def96c0

Please sign in to comment.
You can’t perform that action at this time.