fix off-by-one error in poll results display

This commit is contained in:
Brion Vibber 2011-03-08 15:44:51 -08:00
parent cbf16a4974
commit d990357be9

View File

@ -166,7 +166,9 @@ class Poll extends Managed_DataObject
$raw = array();
while ($pr->fetch()) {
$raw[$pr->selection] = $pr->votes;
// Votes list 1-based
// Array stores 0-based
$raw[$pr->selection - 1] = $pr->votes;
}
$counts = array();