From 39de15eac6b59d9c49634f63e6fcd3ca03082a12 Mon Sep 17 00:00:00 2001 From: Paul J R Date: Thu, 25 Oct 2012 18:31:46 +1100 Subject: [PATCH 1/1] fixing a small undefined var bug --- gwvpmini/gwvpmini_db.php | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gwvpmini/gwvpmini_db.php b/gwvpmini/gwvpmini_db.php index fc6babc..d47bcee 100644 --- a/gwvpmini/gwvpmini_db.php +++ b/gwvpmini/gwvpmini_db.php @@ -737,7 +737,7 @@ function gwvpmini_GetMessagesForId($uid) error_log("request message for uid, $uid with sql $sql"); $i = 0; - if(!$res) return 0; + if(!$res) return 0; foreach($res as $row) { $retval[$i]["id"] = $row["msgs_id"]; $retval[$i]["type"] = $row["msgs_type"]; @@ -745,8 +745,8 @@ function gwvpmini_GetMessagesForId($uid) $i++; } - - return $retval; + if($i == 0) return 0; + else return $retval; } -- 1.7.0.4