forked from Wavyzz/dolibarr
fix cti (#29812)
* fix cti Dead catch - OdfException is never thrown in the try block. * Update json.lib.php
This commit is contained in:
@@ -297,7 +297,6 @@ function dol_json_decode($json, $assoc = false)
|
||||
if ($out != '') {
|
||||
try {
|
||||
// @phan-suppress-next-line PhanPluginUnsafeEval
|
||||
//print debug_print_backtrace();
|
||||
eval('$array = '.$out.';'); // not secured but this is no mode used as php json lib is always expected to be loaded now.
|
||||
} catch (Exception $e) {
|
||||
$array = array();
|
||||
|
||||
@@ -396,7 +396,6 @@ class doc_generic_asset_odt extends ModelePDFAsset
|
||||
}
|
||||
}
|
||||
// Replace tags of lines
|
||||
try {
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
$listlines = $odfHandler->setSegment('lines');
|
||||
@@ -428,13 +427,14 @@ class doc_generic_asset_odt extends ModelePDFAsset
|
||||
}
|
||||
$listlines->merge();
|
||||
}
|
||||
try {
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
}
|
||||
} catch (OdfException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Replace labels translated
|
||||
$tmparray = $outputlangs->get_translations_for_substitutions();
|
||||
|
||||
Reference in New Issue
Block a user