Skip to content

Commit

Permalink
Dev: Check surveyinfo === false, not empty ('0' is empty in PHP)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 29, 2017
1 parent 554ea00 commit 353521f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/admin/globalsettings.php
Expand Up @@ -159,10 +159,10 @@ protected function getSurveyFolderStorage($uploaddir, $decimals)
$surveys[] = array(
'sizeInBytes' => $size,
'size' => humanFilesize($size, $decimals),
'name' => empty($surveyinfo['name']) ? '(' . gT('deleted') . ')' : $surveyinfo['name'],
'deleted' => empty($surveyinfo['name']),
'name' => $surveyinfo === false ? '(' . gT('deleted') . ')' : $surveyinfo['name'],
'deleted' => $surveyinfo === false,
'showPurgeButton' => Permission::model()->hasGlobalPermission('superadmin', 'delete')
&& empty($surveyinfo['name']),
&& $surveyinfo === false,
'sid' => $surveyId
);
}
Expand Down

0 comments on commit 353521f

Please sign in to comment.