Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't process empty string in xml creation

  • Loading branch information...
commit fd36efea8c474b3b1020f4c0a987bd0662145e53 1 parent a94eb4d
@dswalker authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 library/Xerxes/Utility/Parser.php
View
13 library/Xerxes/Utility/Parser.php
@@ -693,9 +693,18 @@ public static function addToXML(\DOMDocument &$xml, $id, $object)
$id = "object_$id";
}
+ // don't try to process empty strings
+
+ $str = Parser::escapeXml($object);
+
+ if ($str == '')
+ {
+ return $xml;
+ }
+
// just create a simple new element and return this thing
-
- $element = $xml->createElement($id, Parser::escapeXml($object) );
+
+ $element = $xml->createElement($id, $str);
$xml->documentElement->appendChild($element);
return $xml;
}
Please sign in to comment.
Something went wrong with that request. Please try again.