This commit is contained in:
Shish 2020-10-27 01:41:07 +00:00
parent 10f563ee37
commit 754f0b2f39

View file

@ -413,7 +413,7 @@ abstract class DataHandlerExtension extends Extension
$image->filesize = $metadata['size'];
$image->hash = $metadata['hash'];
$image->filename = ($pos = str_contains($metadata['filename'], '?')) ? substr($metadata['filename'], 0, $pos) : $metadata['filename'];
$image->filename = ($pos = strpos($metadata['filename'], '?')) ? substr($metadata['filename'], 0, $pos) : $metadata['filename'];
if (array_key_exists("extension", $metadata)) {
$image->set_mime(MimeType::get_for_file($filename, $metadata["extension"]));