Skip to content

Commit

Permalink
Fix PHP Warning: exif_read_data(...): Illegal IFD size (#6169)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Feb 12, 2018
1 parent 332cdf6 commit b46cd5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Fix bug where text: syntax was forced for strings longer than 1024 characters (#6143)
- Managesieve: Fix missing Save button in Edit Filter Set page of Classic skin (#6154)
- Fix duplicated labels in Test SMTP Config section (#6166)
- Fix PHP Warning: exif_read_data(...): Illegal IFD size (#6169)

RELEASE 1.3.4
-------------
Expand Down
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ public function resize($size, $filename = null, $browser_compat = false)
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $width, $height, $props['width'], $props['height']);
$image = $new_image;

// fix rotation of image if EXIF data exists and specifies rotation (GD strips the EXIF data)
// fix orientation of image if EXIF data exists and specifies orientation (GD strips the EXIF data)
if ($this->image_file && $type == 'jpg' && function_exists('exif_read_data')) {
$exif = exif_read_data($this->image_file);
$exif = @exif_read_data($this->image_file);
if ($exif && $exif['Orientation']) {
switch ($exif['Orientation']) {
case 3:
Expand Down

0 comments on commit b46cd5d

Please sign in to comment.