Skip to content

Commit f3a5bca

Browse files
authored
Merge pull request #8 from AndrewStarlike/master
- suppress errors (to avoid warnings) if an invalid xml is passed
2 parents d712fe8 + 7821d82 commit f3a5bca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LSS/XML2Array.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function init($version = '1.0', $encoding = 'UTF-8', $format_outpu
6969
public static function &createArray($input_xml, $options = 0) {
7070
$xml = self::getXMLRoot();
7171
if(is_string($input_xml)) {
72-
$parsed = $xml->loadXML($input_xml, $options);
72+
$parsed = @$xml->loadXML($input_xml, $options);
7373
if(!$parsed) {
7474
throw new Exception('[XML2Array] Error parsing the XML string.');
7575
}

0 commit comments

Comments
 (0)