Alexander Nicolaysen Sørnes : comment: Prevent accessing some undefined variables

Alexander Nicolaysen Sørnes asornes at winehq.org
Fri Jul 24 10:05:40 CDT 2009


Module: appdb
Branch: master
Commit: e641db3d6c60b71f7dfeaced8778dc05b6282819
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=e641db3d6c60b71f7dfeaced8778dc05b6282819

Author: Alexander Nicolaysen Sørnes <alexander at linux-xqqm.site>
Date:   Fri Jul 24 00:20:41 2009 +0200

comment: Prevent accessing some undefined variables

---

 include/comment.php |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/comment.php b/include/comment.php
index 09c2ab3..6a1716a 100644
--- a/include/comment.php
+++ b/include/comment.php
@@ -47,14 +47,9 @@ class Comment {
             $this->iCommentId = $oRow->commentId;
             $this->iParentId = $oRow->parentId;
 
-            if($oRow->appId)
-            {
-                $this->iAppId = $oRow->appId;
-            } else
-            {
-                $oVersion = new version($this->iVersionId);
-                $this->iAppId = $oApp->iAppId;
-            }
+            $oVersion = new version($this->iVersionId);
+            $this->iAppId = $oVersion->iAppId;
+
             $this->iVersionId = $oRow->versionId;
             $this->sSubject = $oRow->subject;
             $this->sBody = $oRow->body;




More information about the wine-cvs mailing list