[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
Wed Jan 28 05:41:04 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:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 I've got an error in the log:

 {{{
 PHP Notice:  Function wpdb::prepare was called
 <strong>incorrectly</strong>. The query argument of wpdb::prepare() must
 have a placeholder. Please see <a href="https://developer.wordpress.org
 /advanced-administration/debug/debug-wordpress/">Debugging in
 WordPress</a> for more information. (This message was added in version
 3.9.0.) in ***\app\public\wp-includes\functions.php on line 6131
 }}}


 And this line that message refers to is the line in wp_trigger_error()
 that calls trigger_error() and, from the debugging point of view, is
 pointless. Of course there are filters before, and you can find the source
 of the issue via debug tools, but this needs to be done additionally, when
 actual information that is already captured can be just printed into the
 log.

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


More information about the wp-trac mailing list