Skip to content

Commit

Permalink
Fixed issue #7796: Statistics crash on numerical answers
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 10, 2013
1 parent ae29d9f commit 12f90d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -1047,7 +1047,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
elseif (incompleteAnsFilterState() == "complete") {$query .= " AND submitdate is not null";}

//$sql was set somewhere before
if ($sql != "NULL") {$query .= " AND $sql";}
if (!empty($sql)) {$query .= " AND $sql";}

//execute query
$result=Yii::app()->db->createCommand($query)->queryAll();
Expand Down Expand Up @@ -3528,7 +3528,7 @@ protected function getQuartile($quartile, $fieldname, $surveyid, $sql, $excludez
}

//if $sql values have been passed to the statistics script from another script, incorporate them
if ($sql != "NULL") {$query .= " AND $sql";}
if (!empty($sql)) {$query .= " AND $sql";}
}

if ($surveyid !== $sid) {
Expand Down

0 comments on commit 12f90d2

Please sign in to comment.