version: Make sure we always return a valid object in objectGetParent()

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-07-21 17:11:57 +02:00
parent 00f9a20596
commit 8f6927f603

View File

@@ -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);