From 3b95166b2174cd6d45e8ffab7ca417a07802e5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sat, 14 Jun 2014 19:31:17 +0200 Subject: [PATCH] strip invalid characters on reports --- application/core/ErrorHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/core/ErrorHandler.php b/application/core/ErrorHandler.php index 3c841f6d..ccac4327 100644 --- a/application/core/ErrorHandler.php +++ b/application/core/ErrorHandler.php @@ -254,7 +254,8 @@ class ErrorHandler { $type = gettype($arg); $string .= $type . '('; if (is_string($arg)) { - $string .= print_r(substr($arg, 0, 20), true); + $param = iconv('UTF-8', 'UTF-8//IGNORE', substr($arg, 0, 20)); + $string .= print_r($param, true); } else { $string .= print_r($arg, true); }