[wp-trac] [WordPress Trac] #56709: Encountered a problem that no one has ever met Please help me
WordPress Trac
noreply at wordpress.org
Sun Oct 2 18:58:23 UTC 2022
#56709: Encountered a problem that no one has ever met Please help me
-------------------------------+------------------------------
Reporter: qq2094629698 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: dev-feedback php8 | Focuses:
-------------------------------+------------------------------
Changes (by jrf):
* keywords: dev-feedback => dev-feedback php8
Comment:
Thanks for looping me in @davidbaumwald.
I have seen numerous similar issues, including with the
`convert_smilies()` function, and they are 100% of the time caused by an
incorrect call to this function, so this needs a backtrace to figure out
where this is coming from.
> Tracing this in the 6.0 branch, this seems to point to
https://core.trac.wordpress.org/browser/branches/6.0/src/wp-
includes/formatting.php#L3415 which does implement count on a variable
that could indeed be false.
The thing is, it will actually be pretty hard to get this error, even when
passing invalid input.
The `preg_split()` doesn't easily return `false`. AFAIK, this will only
happen when the regex is faulty (which it isn't) and would then be
accompanied by a warning about the error in the regex, see:
https://3v4l.org/N3t8W
@qq2094629698 Aside from the backtrace, could you please also mention in
your reply:
* The version of WordPress you are using (to confirm we're actually
looking at the right call to `count()`.
* The version of PHP your site is running on.
* Test whether you can still reproduce the error with a WP native theme
and all plugins turned off ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56709#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list