From 52c0e75af9f40705f36e395e7c4088afe7b86e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Tue, 19 Jun 2007 00:29:37 +0000 Subject: [PATCH] Don't display editor for non-existent entries --- include/objectManager.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/objectManager.php b/include/objectManager.php index 09c027b..92aad90 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -181,6 +181,14 @@ class ObjectManager $oObject = new $this->sClass($this->iId); + /* The entry does not exist */ + if(!$oObject->objectGetId()) + { + echo "There is no entry with that id in the database.\n"; + echo ""; + return; + } + /* Display errors, if any, and fetch form data */ if($this->displayErrors($sErrors)) {