From 8f6927f603e260b403f9153324ad688336b4d940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Tue, 21 Jul 2009 17:11:57 +0200 Subject: [PATCH] version: Make sure we always return a valid object in objectGetParent() --- include/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/version.php b/include/version.php index b1bceae..ae0bc3e 100644 --- a/include/version.php +++ b/include/version.php @@ -786,7 +786,7 @@ class version { public function objectGetParent($sClass = '') { /* No id so we can't query the DB, but perhaps an entry is cached? */ - if(!$this->iAppId) + if(!$this->iAppId && $this->oApp) return $this->oApp; return new application($this->iAppId);