Site logo

[Support request] PHP 8.1 warning in WordPress 5.9

Home Forums Support [Support request] PHP 8.1 warning in WordPress 5.9

Home Forums Support PHP 8.1 warning in WordPress 5.9

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2098007
    Jarko

    if this could be fixed to future releases would be great. Thanks

    Deprecated
    preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated

    wp-includes/block-supports/layout.php:167
    preg_match()
    wp-includes/block-supports/layout.php:167
    wp_render_layout_support_flag()
    wp-includes/class-wp-hook.php:309
    apply_filters(‘render_block’)
    wp-includes/class-wp-block.php:284
    WP_Block->render()
    wp-includes/blocks.php:883
    render_block()
    wp-includes/blocks.php:921
    do_blocks()
    wp-includes/class-wp-hook.php:307
    apply_filters(‘the_content’)
    wp-includes/post-template.php:253
    the_content()
    wp-content/themes/generatepress/content-page.php:73
    load_template(‘wp-content/themes/generatepress/content-page.php’)
    wp-includes/template.php:716
    locate_template()
    wp-includes/general-template.php:204
    get_template_part(‘content’,’page’)
    wp-content/themes/generatepress/inc/theme-functions.php:568
    generate_do_template_part()
    wp-content/themes/generatepress/page.php:34

    GeneratePressVersion: 3.1.1
    GP Premium Version 2.1.1

    #2098663
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The stack is showing that this warning is in class-wp-hook.php which is a core file. I don’t believe this is theme-related.

    It mentions the theme at the bottom because we call the_content() function, which then in turn causes this warning. It could be a bug in WordPress itself, or it could be a bug in a plugin you’re using that’s adding a filter somewhere along the line.

    Let us know if you need more info 🙂

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