diff --git a/src/tpl/think_exception.tpl b/src/tpl/think_exception.tpl index 6ea9677cdd..0974bac80c 100644 --- a/src/tpl/think_exception.tpl +++ b/src/tpl/think_exception.tpl @@ -68,7 +68,7 @@ if (!function_exists('parse_args')) { break; } - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; + $result[] = is_int($key) ? $value : sprintf('\'%s\' => %s', htmlentities($key), $value); } return implode(', ', $result);