(bug 16689) wfDebugLog writes an error in Apache error.log
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 20 Dec 2008 02:19:33 +0000 (02:19 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 20 Dec 2008 02:19:33 +0000 (02:19 +0000)
includes/GlobalFunctions.php

index 347b17d..2b23802 100644 (file)
@@ -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();