Fix importazione FE con codice articolo vuoto

This commit is contained in:
MatteoPistorello 2022-02-28 12:09:24 +01:00
parent 4a2e5830d4
commit ffa81f82d0
1 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,12 @@ class XML
throw new Exception($message);
}
$xpath = '//*[not(normalize-space())]';
foreach (array_reverse($xml->xpath($xpath)) as $remove) {
unset($remove[0]);
}
$result = json_decode(json_encode($xml), true);
return $result;