修复 语法严谨性

This commit is contained in:
Comsenz 2017-07-28 09:33:59 +08:00
parent 7f0bf51123
commit df8cd50a12
1 changed files with 7 additions and 5 deletions

View File

@ -37,6 +37,7 @@ function getuploadconfig($uid=0, $fid=0, $limit=true) {
loadcache('attachtype');
$fid = isset($_G['cache']['attachtype'][$fid]) ? $fid : 0;
$filter = array();
if(is_array($_G['cache']['attachtype'][$fid])) {
foreach($_G['cache']['attachtype'][$fid] as $extension => $maxsize) {
if($maxsize == 0) {
$notallow[] = $extension;
@ -44,6 +45,7 @@ function getuploadconfig($uid=0, $fid=0, $limit=true) {
$filter[] = "'$extension':$maxsize";
}
}
}
if(!empty($filter)) {
$config['filtertype'] = '{'.implode(',', $filter).'}';
}