From 567407d21e90d736a11b90a4a4134bff69030cb5 Mon Sep 17 00:00:00 2001 From: physikerwelt Date: Mon, 3 Jun 2013 09:50:43 +0000 Subject: [PATCH] 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 --- includes/debug/Debug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) ); } } -- 2.20.1