Skip to content

Commit

Permalink
Fixed issue #7023: Error when viewing charts in stats with a radio bu…
Browse files Browse the repository at this point in the history
…tton question
  • Loading branch information
c-schmitz committed Dec 9, 2012
1 parent da35ef1 commit 11624cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/admin/statistics_helper.php
Expand Up @@ -193,9 +193,10 @@ function createChart($iQuestionID, $iSurveyID, $type = null, $lbl, $gdata, $graw
// this block is to remove the items with value == 0
// and an inelegant way to remove comments from List with Comments questions
$i = 0;
$aHelperArray=array_keys($lbl);
while (isset ($gdata[$i]))
{
if ($gdata[$i] == 0 || ($type == "O" && substr($lbl[$i],0,strlen($oLanguage->gT("Comments")))==$oLanguage->gT("Comments")))
if ($gdata[$i] == 0 || ($type == "O" && substr($aHelperArray[$i],0,strlen($oLanguage->gT("Comments")))==$oLanguage->gT("Comments")))
{
array_splice ($gdata, $i, 1);
array_splice ($lbl, $i, 1);
Expand Down

0 comments on commit 11624cf

Please sign in to comment.