From: Aaron Schulz Date: Sat, 20 Dec 2008 02:19:33 +0000 (+0000) Subject: (bug 16689) wfDebugLog writes an error in Apache error.log X-Git-Tag: 1.31.0-rc.0~43866 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=8f25eb1f85da132e633997c501e29ebf1cfe17cc;p=lhc%2Fweb%2Fwiklou.git (bug 16689) wfDebugLog writes an error in Apache error.log --- 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();