From d72f3898e3d78f5e018a155e3c47c43c366ccec4 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 25 Jul 2023 15:54:35 +0200 Subject: strip superfluous newlines in title --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it.class b/it.class index 098e57d..418427f 100644 --- a/it.class +++ b/it.class @@ -168,7 +168,7 @@ static function error($p = array(), $extra = null) return $p['fatal'] ? self::_exit($p) : null; $p['title'] = $p[0] ?: $p['title']; # handle 'it_error' => "oops" that was cast to array on the way - $p['title'] = grapheme_substr($p['title'], 0, 2000) ?: substr($p['title'], 0, 2000); + $p['title'] = rtrim(grapheme_substr($p['title'], 0, 2000) ?: substr($p['title'], 0, 2000)); $p += is_callable(self::$error_context) ? (self::$error_context)() : []; $home = $GLOBALS['ULTRAHOME']; -- cgit v1.2.3