1、更新内核

2、代码格式化
This commit is contained in:
2016-07-21 14:29:32 +08:00
parent 3cc2c38dc7
commit a72ba86faa
20 changed files with 1214 additions and 1083 deletions

View File

@@ -195,11 +195,8 @@ class File extends SplFileObject
{
$extension = strtolower(pathinfo($this->getInfo('name'), PATHINFO_EXTENSION));
/* 对图像文件进行严格检测 */
if (in_array($extension, array('gif', 'jpg', 'jpeg', 'bmp', 'png', 'swf'))) {
$imginfo = getimagesize($this->filename);
if (empty($imginfo) || ('gif' == $extension && empty($imginfo['bits']))) {
return false;
}
if (in_array($extension, ['gif', 'jpg', 'jpeg', 'bmp', 'png', 'swf']) && !in_array(exif_imagetype($this->filename), [1, 2, 3, 4, 6])) {
return false;
}
return true;
}