[wp-trac] [WordPress Trac] #54827: Elemtentor, pagina
WordPress Trac
noreply at wordpress.org
Sat Jan 15 09:55:42 UTC 2022
#54827: Elemtentor, pagina
----------------------------+---------------------
Reporter: flashprice2020 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.0
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+---------------------
Changes (by costdev):
* keywords: needs-design =>
* type: feature request => defect (bug)
* component: Plugins => Formatting
* severity: critical => normal
* milestone: Awaiting Review => 6.0
Comment:
This is caused by the following line:
{{{#!php
<?php
if ( count( $matches ) == 0 ) {
}}}
`$matches` assumes an array comes from `preg_replace_callback`.
However, `preg_replace_callback` may return `null`. See
[https://www.php.net/manual/en/function.preg-replace-callback.php
preg_replace_callback].
A guard is needed to return an empty string if `$matches` is `null`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54827#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list