mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 23:43:12 +00:00
Fix #1689 : Discard wrong XML errors
This commit is contained in:
@@ -425,7 +425,7 @@ class Xmlhttp implements ControllerProviderInterface
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
$fields = array();
|
$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) {
|
foreach ($sx->fields->children() as $fn => $fv) {
|
||||||
if (!array_key_exists($fn, $fields)) {
|
if (!array_key_exists($fn, $fields)) {
|
||||||
$fields[$fn] = array();
|
$fields[$fn] = array();
|
||||||
@@ -460,7 +460,7 @@ class Xmlhttp implements ControllerProviderInterface
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
foreach ($rs as $row) {
|
foreach ($rs as $row) {
|
||||||
if (!($sx = simplexml_load_string($row['xml']))) {
|
if (!($sx = @simplexml_load_string($row['xml']))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$t_desc = array();
|
$t_desc = array();
|
||||||
|
Reference in New Issue
Block a user