From 11624cfee9478b102fb668dbdd25e39e70a9a3f9 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Sun, 9 Dec 2012 18:12:07 +0100 Subject: [PATCH] Fixed issue #7023: Error when viewing charts in stats with a radio button question --- application/helpers/admin/statistics_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/helpers/admin/statistics_helper.php b/application/helpers/admin/statistics_helper.php index 2f70ecbadca..d73e7116843 100644 --- a/application/helpers/admin/statistics_helper.php +++ b/application/helpers/admin/statistics_helper.php @@ -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);