From: physikerwelt Date: Mon, 3 Jun 2013 09:50:43 +0000 (+0000) Subject: Remove non UTF-8 chars from debug output X-Git-Tag: 1.31.0-rc.0~19436^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=567407d21e90d736a11b90a4a4134bff69030cb5;p=lhc%2Fweb%2Fwiklou.git Remove non UTF-8 chars from debug output The debug output might contain non UTF-8 chars. Theses bad characters are not compatible with the debug toolbar. As a result the debug toolbar disappears. Non UTF-8 chars are being produced by the database log that prints out binary fields for example. Bug: 48951 Change-Id: I42f7a5c913b378c05b68970646c75894ca068ed9 --- diff --git a/includes/debug/Debug.php b/includes/debug/Debug.php index ec9a62af7f..e2cfa98b19 100644 --- a/includes/debug/Debug.php +++ b/includes/debug/Debug.php @@ -310,7 +310,7 @@ class MWDebug { global $wgDebugComments, $wgShowDebug; if ( self::$enabled || $wgDebugComments || $wgShowDebug ) { - self::$debug[] = rtrim( $str ); + self::$debug[] = rtrim( UtfNormal::cleanUp( $str ) ); } }