Skip to content

Commit

Permalink
return null in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder-somar committed Oct 1, 2023
1 parent 5c8b11b commit cf6a711
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Control/ElementFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function finished()

while(!$page instanceof SiteTree) {
$page = $page->getPage();

if ($page === null) {
return null;
}
}
$controller = Injector::inst()->create($page->getControllerName(), $page->data());
$element = $this->element;
Expand Down

0 comments on commit cf6a711

Please sign in to comment.