Site logo

[Support request] PHP 8.1 deprecated warning preg_replace

Home Forums Support [Support request] PHP 8.1 deprecated warning preg_replace

Home Forums Support PHP 8.1 deprecated warning preg_replace

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2537770
    Jarko

    6.2-beta2 PHP 8.1
    Generate press theme 3.2.4

    http://localhost/wp/wp-admin/nav-menus.php

    Gives following PHP warning (when debug is enabled)

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

    #2537779
    Jarko

    Also http://localhost/wp/wp-admin/customize.php gives:

    
    Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\xampp\htdocs\wp\wp-includes\functions.wp-styles.php on line 90

    When using Disable Elements in the GP premium Version 2.2.2

    #2538110
    David
    Staff
    Customer Support

    Thanks for reporting this, we will look into this.

    #2576087
    Jarko

    Any update on this issue? Still in GP Premium Version 2.3.0-rc.2 with WP 6.2 RC3 on PHP 8.2

    wp-admin/nav-menus.php
    Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\xampp\htdocs\test\wp-admin\includes\plugin.php on line 2088

    Thanks!

    #2576591
    David
    Staff
    Customer Support

    Oh, looks like that slipped through.
    I assume the other stripos warning has gone ?

    Ill get the original issue sorted asap. Might be able to squeeze it in this update.

    #2576841
    Jarko

    Cant reproduce the other warning, so not sure. but wp-admin/nav-menus.php is easy to reproduce. Would be great if fixed. Thanks!

    #2577031
    David
    Staff
    Customer Support

    Yeah – that was my mistake i only prioritised the second issue. We’ll take a look at the first!!

    #2577046
    David
    Staff
    Customer Support

    OK, so excuse the back and forth – we took a closer look at the first issue. And it looks to be a core issue.
    Can you check if it appears on your site without GPP and a different theme ?

    #2577117
    Jarko

    Isn’t nav-menus.php GP specific? As Twenty Twenty-Three Version: 1.1 don’t have nav-menus.php

    Could it be same as the problem in https://core.trac.wordpress.org/ticket/57580

    In WP 6.2 RC 3 WordPress has cleaned many PHP warnings for 8.2

    Thanks!

    #2578630
    David
    Staff
    Customer Support

    the nav-menus.php is a core template for the menus admin screen. And i am pretty sure we don’t write any data to that.
    Does the issue still show when GP Premium is disabled ?

    #2578943
    Jarko

    Yes looks like its core code. Made ticket https://core.trac.wordpress.org/ticket/57974#ticket
    Yes when GP Premium is disabled it still exist. Don’t know another theme that use nav-menus.php as Tried “Twenty Twenty-Three Version: 1.1” but it gives “with Your theme does not support navigation menus or widgets.”

    #2579477
    David
    Staff
    Customer Support

    Twenty23 is a block based theme so its using a block template for its header and nav, which may be why.
    Looks like core has a fix ready for 6.2.1

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.