From 8e5c67a3acf0cbb2ee3cdd236b14fd2c5f71fd90 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 b67dfa8e775..10ce9f0e571 100644 --- a/application/helpers/admin/statistics_helper.php +++ b/application/helpers/admin/statistics_helper.php @@ -191,9 +191,10 @@ function createChart($iQuestionID, $iSurveyID, $type=null, $lbl, $gdata, $grawda // 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);