[wp-trac] [WordPress Trac] #55119: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/peoplesofthesalmon/public_html/wp-includes/block-supports/layout.php on line 167
WordPress Trac
noreply at wordpress.org
Thu Apr 6 14:04:09 UTC 2023
#55119: Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type
string is deprecated in /home/peoplesofthesalmon/public_html/wp-includes
/block-supports/layout.php on line 167
-------------------------------------------------+-------------------------
Reporter: oneearth27 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: php81 reporter-feedback needs- | Focuses:
testing-info |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* keywords: php81 has-patch => php81 reporter-feedback needs-testing-info
Comment:
The title of this ticket has been fixed. But the description has 2
different deprecations, which may not be related to one another:
>Also in the dashboard, there are some repetitions of the same message
(the first part of the message seems to be blocked by the black left
column):
>`null to parameter #1 ($string) of type string is deprecated in
/home/peoplesofthesalmon/public_html/wp-includes/formatting.php on line
2761`
Hmm, I'm not able to reproduce these `null to non-nullable` deprecations
with this testing environment:
* Localhost: Docker with `wp-env`
* PHP: 8.1
* WordPress: 6.2
* Theme: Twenty-twentytwo TT2
* Plugins: none
* Content: default fresh install
* Testing constants set `wp-config.php`:
{{{#!php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'SCRIPT_DEBUG', true );
define( 'WP_ENVIRONMENT_TYPE', 'local' );
}}}
I'm curious if the `null to non-nullable` has already been resolved
indirectly by a fix that then invoked one of the formatting functions. To
further investigate, more information is needed from @oneearth27.
@oneearth27 you noted:
>The problem occurs even when all the plugins are deactivated. The default
2022 theme is being used.
By "problem occurs", does this apply to the `null to parameter #1
($string) of type string is deprecated in formatting.php`? In other words
with all plugins deactivated and using 2022 (TT2) theme, do you still get
these specific deprecations in your server logs?
If yes:
* Does it happen on specific webpages, only in the admin or front-end, or
all the time?
* Does it happen on WordPress 6.x, such as the latest 6.2?
Any additional information you can provide could help contributors
investigate, including steps of how to reproduce.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55119#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list