Skip to content

Commit

Permalink
Merge pull request #307 from gmambro/2.06
Browse files Browse the repository at this point in the history
Fixed issue #9595: PHP error when deleting a condition
  • Loading branch information
Shnoulle committed Apr 7, 2015
2 parents a03a690 + 1932502 commit ccd239e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -777,9 +777,12 @@ public static function UpgradeConditionsToRelevance($surveyId=NULL, $qid=NULL)
foreach ($aSurveyIDs as $surveyId ) {
// echo $surveyId.'<br>';flush();@ob_flush();
$releqns = self::ConvertConditionsToRelevance($surveyId,$qid);
foreach ($releqns as $key=>$value) {
$sQuery = "UPDATE {{questions}} SET relevance=".Yii::app()->db->quoteValue($value)." WHERE qid=".$key;
Yii::app()->db->createCommand($sQuery)->execute();
if ( !empty( $releqns) ) {
foreach ($releqns as $key=>$value)
{
$sQuery = "UPDATE {{questions}} SET relevance=".Yii::app()->db->quoteValue($value)." WHERE qid=".$key;
Yii::app()->db->createCommand($sQuery)->execute();
}
}
}

Expand Down

0 comments on commit ccd239e

Please sign in to comment.