comment: Fix possible undefined var in constructor

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-11-06 23:56:49 +01:00
committed by Chris Morgan
parent 0776bdeeb9
commit d05ee436f5

View File

@@ -46,7 +46,15 @@ class Comment {
{
$this->iCommentId = $oRow->commentId;
$this->iParentId = $oRow->parentId;
$this->iAppId = $oRow->appId;
if($oRow->appId)
{
$this->iAppId = $oRow->appId;
} else
{
$oVersion = new version($this->iVersionId);
$this->iAppId = $oApp->iAppId;
}
$this->iVersionId = $oRow->versionId;
$this->sSubject = $oRow->subject;
$this->sBody = $oRow->body;