• StanfordAlan

    (@stanfordgriffith)


    Hello,

    I’m getting an error code only on the Media page of the backend of the site.

    Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/customer/www/taylorgeospatial.org/public_html/wp-admin/includes/plugin.php on line 2092

    No one with access to the site has edited the file. The code at that line is in bold below:

    function get_plugin_page_hookname( $plugin_page, $parent_page ) {

    global $admin_page_hooks;

    $parent = get_admin_page_parent( $parent_page );

    $page_type = 'admin';

    if ( empty( $parent_page ) || 'admin.php' === $parent_page || isset( $admin_page_hooks[ $plugin_page ] ) ) {

    if ( isset( $admin_page_hooks[ $plugin_page ] ) ) {

    $page_type = 'toplevel';

    } elseif ( isset( $admin_page_hooks[ $parent ] ) ) {

    $page_type = $admin_page_hooks[ $parent ];

    }

    } elseif ( isset( $admin_page_hooks[ $parent ] ) ) {

    $page_type = $admin_page_hooks[ $parent ];

    }

    $plugin_name = preg_replace( '!\.php!', '', $plugin_page );

    return $page_type . '_page_' . $plugin_name;

    }

    WordPress 6.3.1

    PHP 8.1.22

    What should I do here?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    This problem may be a plugin or theme conflict. Please attempt to deactivate all plugins and switch to the default Twenty Twenty-Two theme. If the problem goes away, re-activate them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to deactivate all plugins and change the theme for you while you’re still logged in without affecting normal visitors to your site.

    If that doesn’t make any difference, try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    If you’d like to manually make a backup of your site first, please follow the steps at https://www.ads-software.com/documentation/article/wordpress-backups/

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    We have the same issue:

    PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/aaa/public_html/wp-includes/kses.php on line 1744

    Moderator James Huff

    (@macmanx)

    Then please try the same steps mentioned above.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Passing null to parameter #3 ($subject) of type array|string is deprecated’ is closed to new replies.