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

or element, or layout
This commit is contained in:
AD7six 2012-01-24 13:54:39 +01:00
parent 4f1be12046
commit def96c0460

View file

@ -679,6 +679,10 @@ class View extends Object {
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.'));
}