Fix #1689 : Discard wrong XML errors

This commit is contained in:
Romain Neutron
2014-02-10 12:15:17 +01:00
parent de6959f59f
commit 8cdd19bcf7

View File

@@ -425,7 +425,7 @@ class Xmlhttp implements ControllerProviderInterface
$stmt->closeCursor();
$fields = array();
if ($row && ($sx = simplexml_load_string($row['xml']))) {
if ($row && ($sx = @simplexml_load_string($row['xml']))) {
foreach ($sx->fields->children() as $fn => $fv) {
if (!array_key_exists($fn, $fields)) {
$fields[$fn] = array();
@@ -460,7 +460,7 @@ class Xmlhttp implements ControllerProviderInterface
$stmt->closeCursor();
foreach ($rs as $row) {
if (!($sx = simplexml_load_string($row['xml']))) {
if (!($sx = @simplexml_load_string($row['xml']))) {
continue;
}
$t_desc = array();