Skip to content

ext/gd: imagerotate removes ignore_transparent argument. #11426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ PHP 8.3 UPGRADE NOTES
- Dom:
. Changed DOMCharacterData::appendData() tentative return type to true.

- Gd:
. Changed imagerotate signature, removed the `ignore_transparent` argument
as it was not used internally anyway from PHP 7.x.

- Intl:
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
now returns true on success, previously null was returned.
Expand Down
3 changes: 1 addition & 2 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,9 +1189,8 @@ PHP_FUNCTION(imagerotate)
gdImagePtr im_dst, im_src;
double degrees;
zend_long color;
bool ignoretransparent = 0;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|b", &SIM, gd_image_ce, &degrees, &color, &ignoretransparent) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl", &SIM, gd_image_ce, &degrees, &color) == FAILURE) {
RETURN_THROWS();
}

Expand Down
3 changes: 1 addition & 2 deletions ext/gd/gd.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,8 @@ function imagegrabscreen(): GdImage|false {}

#endif

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

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

Expand Down
3 changes: 1 addition & 2 deletions ext/gd/gd_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.