From dc81fd9d918b4c0316d76f1b2500e8eb2841252a Mon Sep 17 00:00:00 2001 From: Mauro Cassani Date: Thu, 23 Apr 2026 13:04:39 +0200 Subject: [PATCH] fix: correct handling of self closing PC tags --- src/Utils/DataRefReplacer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/DataRefReplacer.php b/src/Utils/DataRefReplacer.php index df4214e..21be503 100644 --- a/src/Utils/DataRefReplacer.php +++ b/src/Utils/DataRefReplacer.php @@ -192,7 +192,7 @@ private function recursiveReplaceSelfClosedPcTags(object $node, string $string): } elseif ($node->tagName == 'pc' && $node->self_closed === true) { $attributesMap = Map::instance($node->attributes); - if ($dataRefStartValue = $this->map->get($node->attributes['dataRefStart'])) { + if (isset($node->attributes['dataRefStart']) && $dataRefStartValue = $this->map->get($node->attributes['dataRefStart'])) { $string = $this->replaceNewTagString( $node->node, $attributesMap->get('id'),