[wp-trac] [WordPress Trac] #64561: Add to wp_trigger_error() log output information about the source of the error

WordPress Trac noreply at wordpress.org
Thu Jan 29 20:24:16 UTC 2026


#64561: Add to wp_trigger_error() log output information about the source of the
error
-------------------------+------------------------------
 Reporter:  oglekler     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  6.4
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------
Changes (by westonruter):

 * version:   => 6.4


Comment:

 I suppose this is why `wpdb::prepare()` is specifically mentioned in the
 error message so that a dev knows to look at that function to locate the
 source of the error, as opposed to going to `wp-includes/functions.php on
 line 6131`. I don't think that latter file reference can be removed since
 it comes from PHP, but we could look at the stack trace and add
 //additional// file name and line number for where `wp_trigger_error()`
 was called.

 The same would go for the `_doing_it_wrong()` family of functions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64561#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list