Opened 17 months ago
Closed 16 months ago
#59455 closed task (blessed) (fixed)
Replace trigger_error() with wp_trigger_error() for 6.4
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
This ticket tracks an initiative to replace each instance of trigger_error()
with wp_trigger_error()
. The initiative seeks to avoid generating E_USER family errors unless WP_DEBUG
is on. In doing so, users should not see these messages in normal production.
References:
Change History (4)
#3
@
17 months ago
In 56544:
Code Modernization: Use wp_trigger_error() in WP_Text_Diff_Renderer_Table magic methods.
Replaces trigger_error()
with wp_trigger_error()
in each of the WP_Text_Diff_Renderer_Table
magic methods.
[56354] added the dynamic properties deprecation messages to the __get()
, __set()
, __isset()
, __unset()
magic methods. Since that commit, wp_trigger_error()
was introduced (see [56530]) as a wrapper for trigger_error()
.
#4
@
17 months ago
In 56705:
General: Use wp_trigger_error() in _doing_it_wrong() and _deprecated_*().
Uses wp_trigger_error()
in _doing_it_wrong()
and each _deprecated_*()
function, i.e. instead of trigger_error()
.
To avoid redundancy, uses wp_trigger_error()
once. How? Saves each message to $message
variable and then passes it to wp_trigger_error()
at the end of the function.
Functions:
- _doing_it_wrong()
- _deprecated_function()
- _deprecated_constructor()
- _deprecated_class()
- _deprecated_file()
- _deprecated_argument()
- _deprecated_hook()
Follow-up to [56530].
Props azaozz, costdev, flixos90, hellofromTonya, peterwilsoncc.
See #57686.
I made this ticket a blessed task in the spirit of other similar initiatives in each release, such as #58833, #58976, #58955, etc.