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 Apr 25, 2013
1 parent 512dcd2 commit d42763e
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 @@ -3529,7 +3529,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 d42763e

Please sign in to comment.