Skip to content

Commit 6f1faee

Browse files
committed
Fix the handling of incorrectly detected images
1 parent 1967339 commit 6f1faee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wcfsetup/install/files/lib/system/worker/FileRebuildDataWorker.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ private function fixMimeType(): void
9696
$width = $height = null;
9797
if (\str_starts_with($mimeType, 'image/')) {
9898
$data = @\getimagesize($file->getPathname());
99-
if ($data === null) {
99+
if ($data === false) {
100100
// Treat broken images as binary files.
101-
$mimeType === 'application/octet-stream';
101+
$mimeType = 'application/octet-stream';
102102
$detectedFileExtension = 'bin';
103103

104104
if ($file->mimeType === $mimeType) {

0 commit comments

Comments
 (0)