diff options
author | Urban Müller | 2021-03-12 18:29:55 +0100 |
---|---|---|
committer | Urban Müller | 2021-03-12 18:29:55 +0100 |
commit | 97803919b5bef33d34bd6523abff298466840044 (patch) | |
tree | 2575aa7a79f92ed66d7120205b7aba41dce818ba /it.class | |
parent | a8a79ede824088ecb1aee300b04c2cd96b8f1399 (diff) | |
download | itools-97803919b5bef33d34bd6523abff298466840044.tar.gz itools-97803919b5bef33d34bd6523abff298466840044.tar.bz2 itools-97803919b5bef33d34bd6523abff298466840044.zip |
avoid empty title when error message contains invalid utf8
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -162,7 +162,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); + $p['title'] = grapheme_substr($p['title'], 0, 2000) ?: substr($p['title'], 0, 2000); if ($extra) $p = ['title' => 'extraneous params passed to it::error', 'fatal' => $p['fatal']]; |