From ac55d0f511c459bcd6ff7f1dc090cd5d136ac5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sat, 14 Jun 2014 19:36:54 +0200 Subject: [PATCH] mark too long parameters --- application/core/ErrorHandler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/core/ErrorHandler.php b/application/core/ErrorHandler.php index ccac4327..34cab7ea 100644 --- a/application/core/ErrorHandler.php +++ b/application/core/ErrorHandler.php @@ -254,7 +254,10 @@ class ErrorHandler { $type = gettype($arg); $string .= $type . '('; if (is_string($arg)) { - $param = iconv('UTF-8', 'UTF-8//IGNORE', substr($arg, 0, 20)); + $param = iconv('UTF-8', 'UTF-8//IGNORE', $arg); + if (strlen($param) > 20) { + $param = substr($param, 0, 20) . '..'; + } $string .= print_r($param, true); } else { $string .= print_r($arg, true);