Skip to content

Commit

Permalink
Dev: small bug in database.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Aug 21, 2017
1 parent 5f8fe9b commit f461539
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/controllers/admin/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1229,24 +1229,24 @@ private function actionUpdateSurveyLocaleSettings($iSurveyID)

private function _filterEmptyFields(&$oSurvey, $fieldArrayName, $newValue=null){
$aSurvey = $oSurvey->attributes;
$oldValue = $oSurvey->{$fieldArrayName};

if($newValue === null)
{
$newValue = App()->request->getPost($fieldArrayName, '');
$newValue = App()->request->getPost($fieldArrayName, NULL);
}

$newValue = trim($newValue);

if(empty($newValue))
if($newValue === NULL)
{

$newValue = isset($aSurvey[$fieldArrayName]) ? $aSurvey[$fieldArrayName] : $oSurvey->{$fieldArrayName};

}
else
{
$this->updatedFields[] = $fieldArrayName;
}

$newValue = trim($newValue);

$options = $this->updateableFields[$fieldArrayName];
switch($options['type']){
Expand Down

0 comments on commit f461539

Please sign in to comment.