From b6151ce714e0fea29a97d774f1f1ee659d661fed Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 27 Oct 2020 01:55:48 +0000 Subject: [PATCH] ??? --- core/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/extension.php b/core/extension.php index 2228d491..cf841b54 100644 --- a/core/extension.php +++ b/core/extension.php @@ -413,7 +413,7 @@ abstract class DataHandlerExtension extends Extension $image->filesize = $metadata['size']; $image->hash = $metadata['hash']; - $image->filename = ($pos = strpos($metadata['filename'], '?')) ? substr($metadata['filename'], 0, $pos) : $metadata['filename']; + $image->filename = (($pos = strpos($metadata['filename'], '?')) !== false) ? substr($metadata['filename'], 0, $pos) : $metadata['filename']; if (array_key_exists("extension", $metadata)) { $image->set_mime(MimeType::get_for_file($filename, $metadata["extension"]));