Skip to content

Commit

Permalink
Merge pull request #8 from AndrewStarlike/master
Browse files Browse the repository at this point in the history
- suppress errors (to avoid warnings) if an invalid xml is passed
  • Loading branch information
nullivex authored Oct 17, 2018
2 parents d712fe8 + 7821d82 commit f3a5bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LSS/XML2Array.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function init($version = '1.0', $encoding = 'UTF-8', $format_outpu
public static function &createArray($input_xml, $options = 0) {
$xml = self::getXMLRoot();
if(is_string($input_xml)) {
$parsed = $xml->loadXML($input_xml, $options);
$parsed = @$xml->loadXML($input_xml, $options);
if(!$parsed) {
throw new Exception('[XML2Array] Error parsing the XML string.');
}
Expand Down

0 comments on commit f3a5bca

Please sign in to comment.