summaryrefslogtreecommitdiff
path: root/web/lib/acctfuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-07-06 11:47:02 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-08 10:31:18 +0200
commit8a5adf46ae80d396245aa87d6e952d508b31a2db (patch)
treee7b033682327c175ab350a296e28f26acf09f4d1 /web/lib/acctfuncs.inc.php
parentc1bb1df2b3c0e860a29282ec00e74630133742c3 (diff)
acctfuncs.inc.php: Fix "Undefined variable" notices
Initialize the "$details" and "$whovoted" variables with an empty array/string to suppress a "Undefined variable" notice if the votes/voters list is empty. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r--web/lib/acctfuncs.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index a46c9df..59f499e 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -751,6 +751,7 @@ function current_proposal_list($order, $dbh=NULL) {
$q = "SELECT * FROM TU_VoteInfo WHERE End > " . time() . " ORDER BY Submitted " . $order;
$result = db_query($q, $dbh);
+ $details = array();
while ($row = mysql_fetch_assoc($result)) {
$details[] = $row;
}
@@ -766,6 +767,7 @@ function past_proposal_list($order, $lim, $dbh=NULL) {
$q = "SELECT * FROM TU_VoteInfo WHERE End < " . time() . " ORDER BY Submitted " . $order . $lim;
$result = db_query($q, $dbh);
+ $details = array();
while ($row = mysql_fetch_assoc($result)) {
$details[] = $row;
}
@@ -804,6 +806,8 @@ function voter_list($voteid, $dbh=NULL) {
$dbh = db_connect();
}
+ $whovoted = '';
+
$q = "SELECT tv.UserID,U.Username ";
$q.= "FROM TU_Votes tv, Users U ";
$q.= "WHERE tv.VoteID = " . intval($voteid);