[wp-trac] [WordPress Trac] #54060: kses.php global $allowedxmlentitynames naming
WordPress Trac
noreply at wordpress.org
Thu Sep 2 09:09:55 UTC 2021
#54060: kses.php global $allowedxmlentitynames naming
--------------------------+-----------------------------
Reporter: ovidiul | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hi all,
upon debugging this Notice on one of our client's site
{{{#!php
<?php
NoticedError: in_array() expects parameter 2 to be array, null given
in newrelic_notice_error called at ? (?)
in in_array called at /chroot/var/www/wp-includes/kses.php (1863)
in wp_kses_xml_named_entities called at ? (?)
in preg_replace_callback called at /chroot/var/www/wp-includes/kses.php
(1805)
in wp_kses_normalize_entities called at /chroot/var/www/wp-
includes/formatting.php (981)
in _wp_specialchars called at /chroot/var/www/wp-includes/formatting.php
(4574)
in{closure} called at ? (?)
in preg_replace_callback called at /chroot/var/www/wp-
includes/formatting.php (4580)
}}}
I've found a small discrepancy in the namings used in core file `wp-
includes/kses.php `, so the global **$allowedxmlentitynames** variable is
actually used further as **$allowedxmlnamedentities**, I am guessing this
might not be intentional?
I am lead to believe this might be the source of the issue, however, I was
unable to actively duplicate the issue as it happens during a scheduled
cron event.
Happy to submit a patch for this if it's confirmed.
Thank you
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54060>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list