Skip to content

Conversation

@gupta-8
Copy link

@gupta-8 gupta-8 commented Nov 13, 2025

This PR includes two small changes:

  1. Preload Fonts regex safety (fixes Optimize the regex used in maybe_remove_existing_preloaded_fonts #7898)

    • In WP_Rocket\Engine\Media\PreloadFonts\Frontend\Controller::maybe_remove_existing_preloaded_fonts(),
      wrap the preg_replace() call and handle the case where it returns null (PHP 8+ behavior).
    • If preg_replace() fails, we now return the original $html instead of propagating null,
      which avoids a TypeError for the string return type.
  2. Sucuri logo update (fixes Sucuri logo is outdated #6991)

    • Replace assets/img/logo-sucuri.png with the current Sucuri logo, so the UI reflects their latest branding.

No other behavior is changed.

Replace assets/img/logo-sucuri.png with the updated Sucuri logo as requested in wp-media#6991.
Wrap preg_replace() and fall back to original HTML when it returns null
to avoid a PHP 8 TypeError in maybe_remove_existing_preloaded_fonts().
Fixes wp-media#7898.
@gupta-8
Copy link
Author

gupta-8 commented Nov 13, 2025

Hey,

I also added the updated logo-sucuri.png in this PR since it’s a really small, standalone change. Felt easier to include it here instead of opening another PR.

If you’d prefer it separated, I can split it out anytime, just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize the regex used in maybe_remove_existing_preloaded_fonts Sucuri logo is outdated

1 participant