Merge pull request #19 from CodeIgniter/fileext-patch

修复设置扩展名限制为空时无法上传文件的BUG
pull/24/head
warlee 2015-06-23 10:28:58 +08:00
commit b266284445
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;
}
}