[wp-trac] [WordPress Trac] #59652: Replace trigger_error() with wp_trigger_error() for 6.6
WordPress Trac
noreply at wordpress.org
Sat May 25 01:46:24 UTC 2024
#59652: Replace trigger_error() with wp_trigger_error() for 6.6
-----------------------------------------+---------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.6
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch changes-requested | Focuses:
-----------------------------------------+---------------------
Changes (by rajinsharwar):
* keywords: has-patch => has-patch changes-requested
Comment:
Hi @prasadkarmalkar, thanks for the PR. As you might be aware,
wp_trigger_error can also return HTML tags, so we need to strip the tags
before using it. That's the reason the unit tests are failing.
EG:
{{{#!php
wp_strip_all_tags( wp_trigger_error( __FUNCTION__, $error_message ) );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59652#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list