Make WordPress Core


Ignore:
Timestamp:
01/28/2012 11:56:50 AM (13 years ago)
Author:
westi
Message:

Refactor WPDB::get_caller() into wp_debug_backtrace_summary() and improve the functionality to provide enhanced context and a standardised default pretty format. Fixes #19589

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r19760 r19773  
    15461546     */
    15471547    function get_caller() {
    1548         $trace  = array_reverse( debug_backtrace() );
    1549         $caller = array();
    1550 
    1551         foreach ( $trace as $call ) {
    1552             if ( isset( $call['class'] ) && __CLASS__ == $call['class'] )
    1553                 continue; // Filter out wpdb calls.
    1554             $caller[] = isset( $call['class'] ) ? "{$call['class']}->{$call['function']}" : $call['function'];
    1555         }
    1556 
    1557         return join( ', ', $caller );
     1548        return wp_debug_backtrace_summary( __CLASS__ );
    15581549    }
    15591550
Note: See TracChangeset for help on using the changeset viewer.