Skip to content

Conversation

@sarthak-19
Copy link
Contributor

Fixes : #2273

…roy that does nothing in php version > 8.0
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @[email protected].

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: [email protected].

Co-authored-by: westonruter <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.85%. Comparing base (90ae9d7) to head (8ebbb6f).
⚠️ Report is 29 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/webp-uploads/hooks.php 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2285      +/-   ##
==========================================
- Coverage   68.86%   68.85%   -0.02%     
==========================================
  Files          90       90              
  Lines        7610     7612       +2     
==========================================
  Hits         5241     5241              
- Misses       2369     2371       +2     
Flag Coverage Δ
multisite 68.85% <50.00%> (-0.02%) ⬇️
single 35.47% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@westonruter westonruter added [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken labels Dec 7, 2025
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But probably good to add a comment explaining why the phpcs:ignore comments are added, if not already obvious.

@westonruter westonruter added this to the webp-uploads n.e.x.t milestone Dec 9, 2025
@westonruter
Copy link
Member

I just ran across how this is done in core: https://github.com/WordPress/wordpress-develop/blob/9306d1150397c9c1aa09660058488d0bc94eb2a6/src/wp-admin/includes/image-edit.php#L548-L550

			if ( PHP_VERSION_ID < 80000 ) { // imagedestroy() has no effect as of PHP 8.0.
				imagedestroy( $img );
			}

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@westonruter westonruter merged commit 9e37419 into WordPress:trunk Dec 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modern Image Formats: imagedestroy() is deprecated

3 participants