Skip to content

Commit

Permalink
Forms: post-merge tweak to #1894
Browse files Browse the repository at this point in the history
  • Loading branch information
SKuipers committed Feb 17, 2025
1 parent efbac13 commit 119ef67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gibbon/FileUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ public function resizeImage($sourcePath, $destPath, $maxSize = 1024, $quality =

// Handle Exif rotation
if (function_exists('exif_read_data')) {
$exif = exif_read_data($sourcePath);
$imageType = exif_imagetype($sourcePath);
$exif = $imageType <= 3 ? exif_read_data($sourcePath) : [];
if (!empty($exif['Orientation'])) {
switch ($exif['Orientation']) {
case 3:
Expand Down

0 comments on commit 119ef67

Please sign in to comment.