Skip to content
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

Prepare webp-uploads 2.0.1 #1286

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Prepare webp-uploads 2.0.1 #1286

merged 1 commit into from
Jun 6, 2024

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Jun 6, 2024

webp-uploads

svn status:

M       hooks.php
M       load.php
M       readme.txt
svn diff
Index: hooks.php
===================================================================
--- hooks.php	(revision 3098984)
+++ hooks.php	(working copy)
@@ -519,10 +519,14 @@
  *
  * @see wp_filter_content_tags()
  *
- * @param string $content The content of the current post.
+ * @param string|mixed $content The content of the current post.
  * @return string The content with the updated references to the images.
  */
-function webp_uploads_update_image_references( string $content ): string {
+function webp_uploads_update_image_references( $content ): string {
+	if ( ! is_string( $content ) ) {
+		$content = '';
+	}
+
 	// Bail early if request is not for the frontend.
 	if ( ! webp_uploads_in_frontend_body() ) {
 		return $content;
Index: load.php
===================================================================
--- load.php	(revision 3098984)
+++ load.php	(working copy)
@@ -5,7 +5,7 @@
  * Description: Converts images to more modern formats such as WebP or AVIF during upload.
  * Requires at least: 6.4
  * Requires PHP: 7.2
- * Version: 2.0.0
+ * Version: 2.0.1
  * Author: WordPress Performance Team
  * Author URI: https://make.wordpress.org/performance/
  * License: GPLv2 or later
@@ -25,7 +25,7 @@
 	return;
 }
 
-define( 'WEBP_UPLOADS_VERSION', '2.0.0' );
+define( 'WEBP_UPLOADS_VERSION', '2.0.1' );
 define( 'WEBP_UPLOADS_MAIN_FILE', plugin_basename( __FILE__ ) );
 
 require_once __DIR__ . '/helper.php';
Index: readme.txt
===================================================================
--- readme.txt	(revision 3098984)
+++ readme.txt	(working copy)
@@ -4,7 +4,7 @@
 Requires at least: 6.4
 Tested up to:      6.5
 Requires PHP:      7.2
-Stable tag:        2.0.0
+Stable tag:        2.0.1
 License:           GPLv2 or later
 License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 Tags:              performance, images, webp, avif, modern image formats
@@ -62,6 +62,12 @@
 
 == Changelog ==
 
+= 2.0.1 =
+
+**Bug Fixes**
+
+* Fix fatal error when another the_content filter callback returns null instead of a string. ([1283](https://github.com/WordPress/performance/pull/1283))
+
 = 2.0.0 =
 
 **Features**

@westonruter westonruter added [Type] Documentation Documentation to be added or enhanced skip changelog PRs that should not be mentioned in changelogs labels Jun 6, 2024
@westonruter westonruter added this to the webp-uploads 2.0.1 milestone Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

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.

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

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

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

@github-actions github-actions bot temporarily deployed to wp.org plugin: webp-uploads June 6, 2024 23:39 Destroyed
@westonruter westonruter merged commit 5a2d306 into trunk Jun 6, 2024
25 checks passed
@westonruter westonruter deleted the publish/webp-uploads-2.0.1 branch June 6, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog PRs that should not be mentioned in changelogs [Type] Documentation Documentation to be added or enhanced
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants