From 7808a5961f810bfb3ef3431d3a31136578d0dd1d Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Thu, 16 Feb 2023 10:38:50 +0000 Subject: [PATCH] prevent warning in StudipCoreFormat, fixes #2174 Closes #2174 Merge request studip/studip!1402 --- lib/classes/StudipCoreFormat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/StudipCoreFormat.php b/lib/classes/StudipCoreFormat.php index 871f5fa2851..b6562527df5 100644 --- a/lib/classes/StudipCoreFormat.php +++ b/lib/classes/StudipCoreFormat.php @@ -473,7 +473,7 @@ class StudipCoreFormat extends TextFormat */ protected static function markupQuote($markup, $matches, $contents) { - if (mb_strlen($matches[1]) > 1) { + if (isset($matches[1]) && mb_strlen($matches[1]) > 1) { $title = sprintf(_('%s hat geschrieben:'), $markup->format(mb_substr($matches[1], 1))); return sprintf('<blockquote><div class="author">%s</div>%s</blockquote>', $title, trim($contents)); -- GitLab