修复设置扩展名限制为空时无法上传文件的BUG

pull/19/head
Hex 2015-06-22 02:24:30 +08:00
parent 16fb28e770
commit 366b18f298
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ function checkExt($file,$changExt=false){
$not_allow = $GLOBALS['auth']['ext_not_allow'];
$ext_arr = explode('|',$not_allow);
foreach ($ext_arr as $current) {
if (stristr($file,'.'.$current)){//含有扩展名
$current = trim($current);
if ($current !== '' && stristr($file,'.'.$current)){//含有扩展名
return 0;
}
}