Merge pull request #19204 from FHenry/fix_introduced_scrutinizer
Fix introduced scrutinizer
This commit is contained in:
commit
ae103f20ca
@ -795,7 +795,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
|||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
|
||||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
if ($contacts < 0) {
|
if (is_numeric($contacts) && $contacts < 0) {
|
||||||
dol_print_error($db, $object->error, $object->errors);
|
dol_print_error($db, $object->error, $object->errors);
|
||||||
} else {
|
} else {
|
||||||
// Form to add record into a category
|
// Form to add record into a category
|
||||||
|
|||||||
@ -320,17 +320,22 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
|
|
||||||
foreach ($contact_arrray as $array_key => $contact_id) {
|
foreach ($contact_arrray as $array_key => $contact_id) {
|
||||||
$res_contact = $contactstatic->fetch($contact_id);
|
$res_contact = $contactstatic->fetch($contact_id);
|
||||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
if ((int) $res_contact > 0) {
|
||||||
foreach ($tmparray as $key => $val) {
|
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||||
try {
|
foreach ($tmparray as $key => $val) {
|
||||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
try {
|
||||||
} catch (OdfException $e) {
|
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||||
dol_syslog($e->getMessage(), LOG_INFO);
|
} catch (OdfException $e) {
|
||||||
} catch (SegmentException $e) {
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
dol_syslog($e->getMessage(), LOG_INFO);
|
} catch (SegmentException $e) {
|
||||||
|
dol_syslog($e->getMessage(), LOG_INFO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$listlines->merge();
|
||||||
|
} else {
|
||||||
|
$this->error = $contactstatic->error;
|
||||||
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
}
|
}
|
||||||
$listlines->merge();
|
|
||||||
}
|
}
|
||||||
$odfHandler->mergeSegment($listlines);
|
$odfHandler->mergeSegment($listlines);
|
||||||
} catch (OdfException $e) {
|
} catch (OdfException $e) {
|
||||||
|
|||||||
@ -224,8 +224,9 @@ class FormResource
|
|||||||
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
|
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
|
||||||
} elseif ($format == 3) {
|
} elseif ($format == 3) {
|
||||||
$value = $arraytypes['code'];
|
$value = $arraytypes['code'];
|
||||||
|
} elseif (empty($value)) {
|
||||||
|
print ' ';
|
||||||
}
|
}
|
||||||
print $value ? $value : ' ';
|
|
||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user