diff --git a/upload/source/function/function_upload.php b/upload/source/function/function_upload.php index 5a5c584..c871875 100644 --- a/upload/source/function/function_upload.php +++ b/upload/source/function/function_upload.php @@ -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)) {