diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index 21bbafc3..d5bd5bf1 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -68,7 +68,7 @@ break; } - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; + $result[] = is_int($key) ? $value : sprintf('\'%s\' => %s', htmlentities($key), $value); } return implode(', ', $result);