diff --git a/Library/Think/Upload.php b/Library/Think/Upload.php index 11fe967b..31941de7 100644 --- a/Library/Think/Upload.php +++ b/Library/Think/Upload.php @@ -491,8 +491,7 @@ class Upload { * @return boolean */ protected function getExt($filename) { - $pathinfo = pathinfo($filename); - return $pathinfo['extension']; + return pathinfo($filename,PATHINFO_EXTENSION); } /**