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;
|
||||
|
||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
if ($contacts < 0) {
|
||||
if (is_numeric($contacts) && $contacts < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
// 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) {
|
||||
$res_contact = $contactstatic->fetch($contact_id);
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
if ((int) $res_contact > 0) {
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
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);
|
||||
} catch (OdfException $e) {
|
||||
|
||||
@ -224,8 +224,9 @@ class FormResource
|
||||
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
|
||||
} elseif ($format == 3) {
|
||||
$value = $arraytypes['code'];
|
||||
} elseif (empty($value)) {
|
||||
print ' ';
|
||||
}
|
||||
print $value ? $value : ' ';
|
||||
print '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user