2
0
forked from Wavyzz/dolibarr
* fix cti

Dead catch - OdfException is never thrown in the try block.

* Update json.lib.php
This commit is contained in:
Frédéric FRANCE
2024-06-03 13:43:20 +02:00
committed by GitHub
parent f34b6da91b
commit 689cfc36eb
2 changed files with 36 additions and 37 deletions

View File

@@ -297,7 +297,6 @@ function dol_json_decode($json, $assoc = false)
if ($out != '') { if ($out != '') {
try { try {
// @phan-suppress-next-line PhanPluginUnsafeEval // @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. 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) { } catch (Exception $e) {
$array = array(); $array = array();

View File

@@ -396,7 +396,6 @@ class doc_generic_asset_odt extends ModelePDFAsset
} }
} }
// Replace tags of lines // Replace tags of lines
try {
$foundtagforlines = 1; $foundtagforlines = 1;
try { try {
$listlines = $odfHandler->setSegment('lines'); $listlines = $odfHandler->setSegment('lines');
@@ -428,13 +427,14 @@ class doc_generic_asset_odt extends ModelePDFAsset
} }
$listlines->merge(); $listlines->merge();
} }
try {
$odfHandler->mergeSegment($listlines); $odfHandler->mergeSegment($listlines);
}
} catch (OdfException $e) { } catch (OdfException $e) {
$this->error = $e->getMessage(); $this->error = $e->getMessage();
dol_syslog($this->error, LOG_WARNING); dol_syslog($this->error, LOG_WARNING);
return -1; return -1;
} }
}
// Replace labels translated // Replace labels translated
$tmparray = $outputlangs->get_translations_for_substitutions(); $tmparray = $outputlangs->get_translations_for_substitutions();