Skip to content

Commit 1ee35c8

Browse files
committed
Fix compatibility with PHP 8.3.0
The imagerotate() function used to take 3 parameters. Then, in PHP 5.1.0, an optional fourth parameter was added. And now, in PHP 8.3.0, that parameter has been removed. Since the code in GdAdapter always explicitly provides the fourth parameter when calling the function, this causes it to fail with an ArgumentCountError under PHP 8.3.0. This commit removes the unused fourth parameter from all call sites.
1 parent 274511f commit 1ee35c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GdAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ public function rotate($orientation)
9090

9191
// rotate
9292
if (in_array($orientation, [3, 4])) {
93-
$image = imagerotate($this->image, 180, $transparency, 1);
93+
$image = imagerotate($this->image, 180, $transparency);
9494
}
9595
if (in_array($orientation, [5, 6])) {
96-
$image = imagerotate($this->image, -90, $transparency, 1);
96+
$image = imagerotate($this->image, -90, $transparency);
9797
list($this->width, $this->height) = [$this->height, $this->width];
9898
} elseif (in_array($orientation, [7, 8])) {
99-
$image = imagerotate($this->image, 90, $transparency, 1);
99+
$image = imagerotate($this->image, 90, $transparency);
100100
list($this->width, $this->height) = [$this->height, $this->width];
101101
}
102102
/** @var resource $image is now defined */

0 commit comments

Comments
 (0)