No segment defined is not an error

This is a proposition of correction on all ODT file
If we don't define table of segment on odt we have an error
But in some case we don't want an table on ODT
This commit is contained in:
BENKE Charlie 2016-02-19 10:59:50 +01:00
parent 9c8d69eaa9
commit 8349446340

View File

@ -698,9 +698,14 @@ class doc_generic_project_odt extends ModelePDFProjects
}
catch(OdfException $e)
{
$this->error=$e->getMessage();
dol_syslog($this->error, LOG_WARNING);
return -1;
$ExceptionTrace=$e->getTrace();
// no segment defined on ODT is not an error
if($ExceptionTrace[0]['function'] != 'setSegment')
{
$this->error=$e->getMessage();
dol_syslog($this->error, LOG_WARNING);
return -1;
}
}
// Replace tags of project files