commit 07c4c6214468640203cec39a1929e83c5d0ce825
parent 1eb0e16b29e815854a58035e1387485b267111a0
Author: Jan Dankert <devnull@localhost>
Date: Tue, 25 Sep 2018 00:18:18 +0200
Abfangen, wenn bei Page::load() nichts gefunden wird.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/cms-core/model/Page.class.php b/modules/cms-core/model/Page.class.php
@@ -244,6 +244,9 @@ class Page extends BaseObject
$sql->setInt('objectid',$this->objectid);
$row = $sql->getRow();
+ if ( count($row)==0 )
+ throw new \ObjectNotFoundException("Page with Id $this->objectid not found.");
+
$this->pageid = $row['id' ];
$this->templateid = $row['templateid'];