修复 语法严谨性

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,11 +37,13 @@ function getuploadconfig($uid=0, $fid=0, $limit=true) {
loadcache('attachtype');
$fid = isset($_G['cache']['attachtype'][$fid]) ? $fid : 0;
$filter = array();
foreach($_G['cache']['attachtype'][$fid] as $extension => $maxsize) {
if($maxsize == 0) {
$notallow[] = $extension;
} else {
$filter[] = "'$extension':$maxsize";
if(is_array($_G['cache']['attachtype'][$fid])) {
foreach($_G['cache']['attachtype'][$fid] as $extension => $maxsize) {
if($maxsize == 0) {
$notallow[] = $extension;
} else {
$filter[] = "'$extension':$maxsize";
}
}
}
if(!empty($filter)) {