Merge pull request #4655 from defrance/patch-103

ODT generation : No segment defined in odt file is not an error
This commit is contained in:
Laurent Destailleur 2016-02-26 11:15:34 +01:00
commit 16a716ebbc

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