Skip to content

Commit

Permalink
Merge pull request #9 from suve/php-8.3.0-compat
Browse files Browse the repository at this point in the history
Fix compatibility with PHP 8.3.0
  • Loading branch information
splitbrain authored Jan 28, 2024
2 parents 274511f + 1ee35c8 commit 93cd203
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GdAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public function rotate($orientation)

// rotate
if (in_array($orientation, [3, 4])) {
$image = imagerotate($this->image, 180, $transparency, 1);
$image = imagerotate($this->image, 180, $transparency);
}
if (in_array($orientation, [5, 6])) {
$image = imagerotate($this->image, -90, $transparency, 1);
$image = imagerotate($this->image, -90, $transparency);
list($this->width, $this->height) = [$this->height, $this->width];
} elseif (in_array($orientation, [7, 8])) {
$image = imagerotate($this->image, 90, $transparency, 1);
$image = imagerotate($this->image, 90, $transparency);
list($this->width, $this->height) = [$this->height, $this->width];
}
/** @var resource $image is now defined */
Expand Down

0 comments on commit 93cd203

Please sign in to comment.