[VD:LocalFileSystem] do not measure image size for empty image files in _dimensions()

This commit is contained in:
nao-pon
2020-03-19 23:04:03 +09:00
parent c1adb617f4
commit 5614f0b0cb
+1 -1
View File
@@ -705,7 +705,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver
protected function _dimensions($path, $mime)
{
clearstatcache();
return strpos($mime, 'image') === 0 && is_readable($path) && ($s = getimagesize($path)) !== false
return strpos($mime, 'image') === 0 && is_readable($path) && filesize($path) && ($s = getimagesize($path)) !== false
? $s[0] . 'x' . $s[1]
: false;
}