PHP deprecated code

  • Unknown's avatar

    While testing out some code for a plugin I’m creating I’ve noticed several lines in my debug.log file

    [18-Mar-2025 11:09:43 UTC] PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/themusicrealm.com/staging.themusicrealm.com/wp-includes/kses.php on line 1805

    Just thought you might like to know

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    We can’t help with custom coding, nor can we help as your site isn’t running on the wordpress.com platform. – https://wordpress.com/site-profiler/http://staging.themusicrealm.com

  • Unknown's avatar

    The $subject is, as you might expect, required. Look into what you’re calling it with, you’re probably sending it something that doesn’t exist like $array[‘does_not_exist’].

  • Hello Robol1,

    Thanks for letting us know. The notice you’re seeing is a PHP deprecation notice. This means that the code in WordPress is using a function in a way that will no longer be supported in future PHP versions. However, this does not impact your site’s performance or functionality. Deprecation notices are primarily for developers to update their code to ensure compatibility with future PHP releases.

    Also, this forum is for sites hosted on WordPress.com. For self hosted WordPress sites, please post your queries in the appropriate forum here https://wordpress.org/support/forums/

  • The topic ‘PHP deprecated code’ is closed to new replies.