Skip to content

Commit

Permalink
Skip invalid element name
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaito committed Jun 17, 2016
1 parent d366e20 commit f878f13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/array2xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ private function _getXML(&$data, $tabs_count = 0)
if ($key !== FALSE)
{
$this->writer->text(str_repeat($this->newTab, $tabs_count));

$this->writer->startElement($key);

try {
$this->writer->startElement($key);
} catch(Exception $e) {
continue;
}
if ($attrKey !== FALSE && isset($this->elementsAttrs[$attrKey]))
{
foreach ($this->elementsAttrs[$attrKey] as $elementAttrName => $elementAttrText)
Expand Down

0 comments on commit f878f13

Please sign in to comment.