PHP warning

Invalid argument supplied for foreach()

/var/www/html/limesurvey-dev/application/helpers/expressions/em_manager_helper.php(772)

760 
761             if (is_null($surveyId))
762             {
763                 $sQuery='SELECT sid FROM {{surveys}}';
764                 $aSurveyIDs = Yii::app()->db->createCommand($sQuery)->queryColumn();
765             }
766             else{
767                 $aSurveyIDs=array($surveyId);
768             }
769             foreach ($aSurveyIDs as $surveyId )
770             {
771                 $releqns = self::ConvertConditionsToRelevance($surveyId,$qid);
772                 foreach ($releqns as $key=>$value)
773                 {
774                     $sQuery = "UPDATE {{questions}} SET relevance=".Yii::app()->db->quoteValue($value)." WHERE qid=".$key;
775                     Yii::app()->db->createCommand($sQuery)->execute();
776                 }
777             }
778 
779             LimeExpressionManager::SetDirtyFlag();
780         }
781 
782         /**
783         * This reverses UpgradeConditionsToRelevance().  It removes Relevance for questions that have Condition
784         * @param <integer> $surveyId

Stack Trace

#0
+
 /var/www/html/limesurvey-dev/application/controllers/admin/conditionsaction.php(368): LimeExpressionManager::UpgradeConditionsToRelevance(null, "3")
363         // DELETE ENTRY IF THIS IS DELETE
364         if (isset($p_subaction) && $p_subaction == "delete")
365         {
366             LimeExpressionManager::RevertUpgradeConditionsToRelevance(NULL,$qid);   // in case deleted the last condition
367             $result = Condition::model()->deleteRecords(array('cid'=>$p_cid));
368             LimeExpressionManager::UpgradeConditionsToRelevance(NULL,$qid);
369         }
370 
371         // DELETE ALL CONDITIONS IN THIS SCENARIO
372         if (isset($p_subaction) && $p_subaction == "deletescenario")
373         {
#3
+
 /var/www/html/limesurvey-dev/application/core/Survey_Common_Action.php(99): CAction->runWithParamsInternal(conditionsaction, ReflectionMethod, array("subaction" => "editconditionsform", "surveyid" => "861587", "gid" => "2", "qid" => "3", ...))
094             $oMethod = new ReflectionMethod($this, $sDefault);
095         }
096 
097         // We're all good to go, let's execute it
098         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
099         return parent::runWithParamsInternal($this, $oMethod, $params);
100     }
101 
102     /**
103     * Some functions have different parameters, which are just an alias of the
104     * usual parameters we're getting in the url. This function just populates
#7
+
 /var/www/html/limesurvey-dev/application/controllers/AdminController.php(169): CController->run("conditions")
164                     $this->redirect(array('/admin/authentication/sa/login'));
165                 }
166                 
167             }
168 
169             return parent::run($action);
170     }
171 
172     /**
173     * Routes all the actions to their respective places
174     *
2015-04-02 14:17:54 Apache/2.2.15 (CentOS) Yii Framework/1.1.15