Verified Commit 5ac9f1d2 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

fix : add type text/xml in detectSchema function

parent d9087523
......@@ -258,7 +258,7 @@ class ArchiveTransfer extends abstractMessage
protected function detectSchema($message)
{
$mediatype = $this->finfo->file($message->path);
if ($mediatype == 'application/xml') {
if ($mediatype == 'application/xml' || $mediatype === 'text/xml') {
$xml = new \DOMDocument();
$xml->load($message->path);
$messageNamespace = $xml->documentElement->namespaceURI;
......
......@@ -1025,10 +1025,7 @@ class message
}
$messages = $this->read($message[0]->messageId);
$nbMessages = count($messages);
if ($nbMessages != 1) {
if (!$messages) {
throw new \core\Exception\NotFoundException("The message does not exist");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment