Skip to content

Commit

Permalink
Logging API: fix array to string conversion notice
Browse files Browse the repository at this point in the history
log_event() used $p_msg to print the message, instead of the sanitized
$s_msg variable, so when logging DB events which are submitted as an
array with execution time, the notice gets triggered.

Regression introduced by 2d0df25

Fixes #17441
  • Loading branch information
dregad committed Jul 7, 2014
1 parent 4fbd340 commit c2513b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/logging_api.php
Expand Up @@ -90,7 +90,7 @@ function log_event( $p_level, $p_msg ) {
$t_now = date( config_get_global( 'complete_date_format' ) );
$t_level = $g_log_levels[$p_level];

$t_plugin_event = '[' . $t_level . '] ' . $p_msg;
$t_plugin_event = '[' . $t_level . '] ' . $t_msg;
if( function_exists( 'event_signal' ) ) {
event_signal( 'EVENT_LOG', array( $t_plugin_event ) );
}
Expand Down Expand Up @@ -130,7 +130,7 @@ function log_event( $p_level, $p_msg ) {
if( $s_firephp === null ) {
$s_firephp = FirePHP::getInstance( true );
}
$s_firephp->log( $p_msg, $t_php_event );
$s_firephp->log( $t_msg, $t_php_event );
return;
}
# if firebug is not available, fall through
Expand Down

0 comments on commit c2513b1

Please sign in to comment.