Skip to content

Commit 0012034

Browse files
author
dwdcth
authored
fix when xml begin with cdata
such as $input=[ '#key'=> 'val' ]
1 parent 2eb3f30 commit 0012034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ArrayToXML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function buildXML($data, $startElement = 'data')
4141
$xml->startDocument($this->version, $this->encoding);
4242
$xml->startElement($startElement);
4343

44-
$this->writeAttr($xml, $data);
44+
$data = $this->writeAttr($xml, $data);
4545
$this->writeEl($xml, $data);
4646

4747
$xml->endElement(); //write end element

0 commit comments

Comments
 (0)