Skip to content

Commit

Permalink
Fixed issue #11547: Not possible to view responses on PHP version <5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Aug 17, 2016
1 parent 572f287 commit a4570ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/controllers/admin/responses.php
Expand Up @@ -434,7 +434,7 @@ public function browse($iSurveyId)
// So we pass over the safe validation and directly set attributes (second parameter of setAttributes to false).
// see: http://www.yiiframework.com/wiki/161/understanding-safe-validation-rules/
// see: http://www.yiiframework.com/doc/api/1.1/CModel#setAttributes-detail
if(!empty(Yii::app()->request->getParam('SurveyDynamic')))
if(Yii::app()->request->getParam('SurveyDynamic'))
{
$model->setAttributes(Yii::app()->request->getParam('SurveyDynamic'),false);
}
Expand All @@ -445,9 +445,10 @@ public function browse($iSurveyId)
// @see: http://www.yiiframework.com/wiki/281/searching-and-sorting-by-related-model-in-cgridview/
$aVirtualFilters = array('completed_filter', 'firstname_filter', 'lastname_filter', 'email_filter');
foreach($aVirtualFilters as $sFilterName)
if(!empty(Yii::app()->request->getParam('SurveyDynamic')[$sFilterName]))
$aParam=Yii::app()->request->getParam('SurveyDynamic');
if(!empty($aParam[$sFilterName]))
{
$model->$sFilterName = Yii::app()->request->getParam('SurveyDynamic')[$sFilterName];
$model->$sFilterName = $aParam[$sFilterName];
}

// rendering
Expand Down

0 comments on commit a4570ec

Please sign in to comment.