From 518def1855be8082608881725fa2f9ee04ad7922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Fri, 27 Apr 2007 00:06:07 +0000 Subject: [PATCH] Return from version::delete() if there isn't a valid version id --- include/version.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/version.php b/include/version.php index 12ee239..4169de3 100644 --- a/include/version.php +++ b/include/version.php @@ -215,6 +215,10 @@ class Version { */ function delete($bSilent=false) { + /* We need the versionId to continue */ + if(!$this->iVersionId) + return; + /* is the current user allowed to delete this version? */ if(!$_SESSION['current']->canDeleteVersion($this)) return false;