From 8f25eb1f85da132e633997c501e29ebf1cfe17cc Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 20 Dec 2008 02:19:33 +0000 Subject: [PATCH] (bug 16689) wfDebugLog writes an error in Apache error.log --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 347b17d1bc..2b23802bba 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -257,7 +257,7 @@ function wfDebugMem( $exact = false ) { */ function wfDebugLog( $logGroup, $text, $public = true ) { global $wgDebugLogGroups, $wgShowHostnames; - if( $text{strlen( $text ) - 1} != "\n" ) $text .= "\n"; + $text = trim($text)."\n"; if( isset( $wgDebugLogGroups[$logGroup] ) ) { $time = wfTimestamp( TS_DB ); $wiki = wfWikiID(); -- 2.20.1