From b7301083fb22f15b1a3611e16b74ec0a55e2e56b Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Tue, 14 Nov 2023 14:18:01 +0100 Subject: [PATCH] =?UTF-8?q?8733:=20Failed=20test:=20Einzelne=20W=C3=B6rter?= =?UTF-8?q?/S=C3=A4tze=20im=20Text=20formatierten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Services/COPage/classes/class.ilPCParagraph.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Services/COPage/classes/class.ilPCParagraph.php b/Services/COPage/classes/class.ilPCParagraph.php index 28cc8ca0e5b8..9d3fe4790c8f 100755 --- a/Services/COPage/classes/class.ilPCParagraph.php +++ b/Services/COPage/classes/class.ilPCParagraph.php @@ -1276,18 +1276,18 @@ public static function xml2output( // anchor while (preg_match('~~i', $a_text, $found)) { $attribs = self::attribsToArray($found[1]); - $a_text = str_replace("", "[anc name=\"" . $attribs["Name"] . "\"][/anc]", $a_text); + $a_text = str_replace("", "[anc name=\"" . ($attribs["Name"] ?? ""). "\"][/anc]", $a_text); } while (preg_match('~~i', $a_text, $found)) { $attribs = self::attribsToArray($found[1]); - $a_text = str_replace("", "[anc name=\"" . $attribs["Name"] . "\"]", $a_text); + $a_text = str_replace("", "[anc name=\"" . ($attribs["Name"] ?? "") . "\"]", $a_text); } $a_text = str_replace("", "[/anc]", $a_text); // marked text while (preg_match('~~i', $a_text, $found)) { $attribs = self::attribsToArray($found[1]); - $a_text = str_replace("", "[marked class=\"" . $attribs["Class"] . "\"]", $a_text); + $a_text = str_replace("", "[marked class=\"" . ($attribs["Class"] ?? "") . "\"]", $a_text); } $a_text = str_replace("", "[/marked]", $a_text);