Skip to content

Commit b0d8c10

Browse files
committed
ext/gd: imagerotate removes ignore_transparent argument.
seems to be a relic of PHP 5 but no longer makes sense in regard of gdImageRotateInterpolated. Close GH-11426
1 parent a37ad64 commit b0d8c10

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ PHP NEWS
1414
. Fix #77894 (DOMNode::C14N() very slow on generated DOMDocuments even after
1515
normalisation). (nielsdos)
1616

17+
- GD:
18+
. Removed imagerotate "ignore_transparent" argument since it has no effect.
19+
(David Carlier)
20+
1721
- Streams:
1822
. Implement GH-8641 (STREAM_NOTIFY_COMPLETED over HTTP never emitted).
1923
(nielsdos, Jakub Zelenka)

UPGRADING

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ PHP 8.3 UPGRADE NOTES
112112
- Dom:
113113
. Changed DOMCharacterData::appendData() tentative return type to true.
114114

115+
- Gd:
116+
. Changed imagerotate signature, removed the `ignore_transparent` argument
117+
as it was not used internally anyway from PHP 7.x.
118+
115119
- Intl:
116120
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
117121
now returns true on success, previously null was returned.

ext/gd/gd.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1189,9 +1189,8 @@ PHP_FUNCTION(imagerotate)
11891189
gdImagePtr im_dst, im_src;
11901190
double degrees;
11911191
zend_long color;
1192-
bool ignoretransparent = 0;
11931192

1194-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|b", &SIM, gd_image_ce, &degrees, &color, &ignoretransparent) == FAILURE) {
1193+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl", &SIM, gd_image_ce, &degrees, &color) == FAILURE) {
11951194
RETURN_THROWS();
11961195
}
11971196

ext/gd/gd.stub.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,8 @@ function imagegrabscreen(): GdImage|false {}
530530

531531
#endif
532532

533-
// TODO: $ignore_transparent is ignored???
534533
/** @refcount 1 */
535-
function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {}
534+
function imagerotate(GdImage $image, float $angle, int $background_color): GdImage|false {}
536535

537536
function imagesettile(GdImage $image, GdImage $tile): bool {}
538537

ext/gd/gd_arginfo.h

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)