[wp-trac] [WordPress Trac] #57578: Deprecated preg_replace() warning PHP 8.1
WordPress Trac
noreply at wordpress.org
Mon Jan 30 17:15:08 UTC 2023
#57578: Deprecated preg_replace() warning PHP 8.1
-----------------------------+---------------------
Reporter: ipajen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.2
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: php81 has-patch | Focuses:
-----------------------------+---------------------
Comment (by jrf):
Replying to [comment:2 SergeyBiryukov]:
> [attachment:"57578.diff"] fixes the inconsistency by setting the
`$title` global on the affected screens, since it is apparently assumed to
be set on all core administration screens. This resolves the notice in my
testing. No new strings are introduced, because these strings match the
existing page titles.
@SergeyBiryukov Sounds like a solid analysis and the correct solution. 👍
Is there anything we could do unit test-wise to safeguard this ? I haven't
looked at the code in detail (on my break), but I fear this may be
difficult due to it being part of the global page generation code ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57578#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list