fix phpstan for v23 (#36774)

* fix phpstan

* Update functions.lib.php

* Update admin.lang

* Update errors.lang

* Update fournisseur.commande.class.php

* Update fournisseur.commande.class.php

* Update blockedlog_archives.php

* Update blockedlog_archives.php

* Update blockedlog_archives.php

* Update blockedlog_archives.php
This commit is contained in:
Frédéric FRANCE 2026-01-05 12:48:07 +01:00 committed by GitHub
parent 47091a7d37
commit e6249eee32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 11 deletions

View file

@ -141,6 +141,8 @@ $upload_dir = getMultidirOutput($block_static, 'blockedlog').'/archives';
dol_mkdir($upload_dir);
$fh = null;
/*
* Actions
@ -306,7 +308,7 @@ if (GETPOST('action') == 'export' && $user->hasRight('blockedlog', 'read')) { /
$block_static->module_source = $obj->module_source;
$block_static->amounts_excl = (float) $obj->amounts_excl; // Database store value with 8 digits, we cut ending 0 them with (flow)
$block_static->amounts_taxexcl = (float) $obj->amounts_taxexcl; // Database store value with 8 digits, we cut ending 0 them with (flow)
$block_static->amounts = (float) $obj->amounts; // Database store value with 8 digits, we cut ending 0 them with (flow)
$block_static->action = $obj->action;

View file

@ -126,11 +126,11 @@ if (!function_exists('str_contains')) {
* Return the full path of the directory where a module (or an object of a module) stores its files.
* Path may depends on the entity if a multicompany module is enabled.
*
* @param CommonObject|BlockedLog $object Dolibarr common object.
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
* @param int $forobject Return the more complete path for the given object instead of for the module only.
* @param string $mode 'output' (full main dir) or 'outputrel' (relative dir) or 'temp' (full dir for temporary files) or 'version' (full dir for archived files)
* @return string|null The path of the relative directory of the module, ending with /
* @param CommonObject|BlockedLog|null $object Dolibarr common object.
* @param string $module Override object element, for example to use 'mycompany' instead of 'societe'
* @param int $forobject Return the more complete path for the given object instead of for the module only.
* @param string $mode 'output' (full main dir) or 'outputrel' (relative dir) or 'temp' (full dir for temporary files) or 'version' (full dir for archived files)
* @return string|null The path of the relative directory of the module, ending with /
* @since Dolibarr V18
*/
function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'output')

View file

@ -3941,10 +3941,10 @@ class CommandeFournisseur extends CommonOrder
if (!empty($arraydata['thirdparty'])) {
$return .= '<br><span class="info-box-label">'.$arraydata['thirdparty'].'</span>';
}
if (property_exists($this, 'date')) {
$return .= '<br><span class="info-box-label">'.dol_print_date($this->date ? $this->date : $this->date_creation, 'day').'</span>';
if (!empty($this->date)) {
$return .= '<br><span class="info-box-label">'.dol_print_date($this->date, 'day').'</span>';
}
if (property_exists($this, 'total_ht')) {
if (!empty($this->total_ht)) {
$return .= ' &nbsp; <span class="info-box-label amount" title="'.dol_escape_htmltag($langs->trans("AmountHT")).'">'.price($this->total_ht);
$return .= ' '.$langs->trans("HT");
$return .= '</span>';

View file

@ -377,7 +377,7 @@ if ($conf->main_checkbox_left_column) {
print_liste_field_titre("Group", $_SERVER["PHP_SELF"], "g.nom", '', $param, "", $sortfield, $sortorder);
$totalarray['nbfield']++;
//multicompany
if (isModEnabled('multicompany') && is_object($mc) && !getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $conf->entity == 1) {
if (isModEnabled('multicompany') && isset($mc) && is_object($mc) && !getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $conf->entity == 1) {
print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], "g.entity", '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
@ -476,7 +476,7 @@ while ($i < $imaxinloop) {
}
// Multicompany column
if (isModEnabled('multicompany') && is_object($mc) && !getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $conf->entity == 1) {
if (isModEnabled('multicompany') && isset($mc) && is_object($mc) && !getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $conf->entity == 1) {
$mc->getInfo($obj->entity);
print '<td class="center">'.dol_escape_htmltag($mc->label).'</td>';
if (!$i) {