Skip to content

Commit

Permalink
Fix warnings generated by logging api
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis authored and davidhicks committed Aug 20, 2011
1 parent 72678ea commit 098e81f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions application/core/logging_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ function log_event( $p_level, $p_msg, $p_backtrace = null ) {
if ( is_blank( $t_log_destination ) ) {
$t_destination = '';
} else {
@list( $t_destination, $t_modifiers ) = explode( ':', $t_log_destination, 2 );
$t_result = explode( ':', $t_log_destination, 2 );
$t_destination = $t_result[0];
if ( isset( $t_result[1] ) ) {
$t_modifiers = $t_result[1];
}
}

switch( $t_destination ) {
Expand Down Expand Up @@ -180,7 +184,11 @@ function log_print_to_page() {
$t_count = array();
foreach( $g_log_events as $t_log_event ) {
$t_level = $g_log_levels[$t_log_event[1]];
$t_count[$t_log_event[1]]++;
if( isset( $t_count[$t_log_event[1]] ) ) {
$t_count[$t_log_event[1]]++;
} else {
$t_count[$t_log_event[1]] = 1;
}
switch ( $t_log_event[1] ) {
case LOG_DATABASE:
$t_total_queries_count++;
Expand Down

0 comments on commit 098e81f

Please sign in to comment.