Skip to content

Commit 4f1757c

Browse files
author
Martin Brecht-Precht
committed
Fixed some type issues with the XML handler.
1 parent e19116d commit 4f1757c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Handler/XmlHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function onCodeBlock(string $code, ?string $hint = null): void
141141
$codeNode->appendChild($this->createTextNode($code));
142142
}
143143
$hintAttribute = $this->document->createAttribute(KeyNameTranslator::ATTRIBUTE_CODE_HINT);
144-
$hintAttribute->appendChild($this->document->createTextNode($hint));
144+
$hintAttribute->appendChild($this->document->createTextNode((string)$hint));
145145
$codeNode->appendChild($hintAttribute);
146146
/* @var \DOMElement $parent */
147147
$parent = $this->blockParents->get();
@@ -387,7 +387,7 @@ public function onEmphasisContentBegin(int $level): void
387387
{
388388
$emphasisNode = $this->document->createElement(KeyNameTranslator::TYPE_EMPHASIS);
389389
$levelAttribute = $this->document->createAttribute(KeyNameTranslator::ATTRIBUTE_EMPHASIS_LEVEL);
390-
$levelAttribute->appendChild($this->document->createTextNode($level));
390+
$levelAttribute->appendChild($this->document->createTextNode((string)$level));
391391
$emphasisNode->appendChild($levelAttribute);
392392
/* @var \DOMElement $parent */
393393
$parent = $this->contentParents->get();
@@ -455,7 +455,7 @@ public function onLinkContentBegin(string $uri, ?string $title = null): void
455455
$uriAttribute->appendChild($this->document->createTextNode($uri));
456456
$linkNode->appendChild($uriAttribute);
457457
$titleAttribute = $this->document->createAttribute(KeyNameTranslator::ATTRIBUTE_LINK_TITLE);
458-
$titleAttribute->appendChild($this->document->createTextNode($title));
458+
$titleAttribute->appendChild($this->document->createTextNode((string)$title));
459459
$linkNode->appendChild($titleAttribute);
460460
/* @var \DOMElement $parent */
461461
$parent = $this->contentParents->get();

0 commit comments

Comments
 (0)