FIX: some more PHP8 comptability fixes

This commit is contained in:
Marc de Lima Lucio 2023-02-09 18:01:59 +01:00
parent 1e53f87d51
commit da0daa49da
2 changed files with 5 additions and 5 deletions

View File

@ -496,6 +496,10 @@ class FormFile
$titletoshow = ($title == 'none' ? '' : $title); $titletoshow = ($title == 'none' ? '' : $title);
} }
$addcolumforpicto = ($delallowed || $printer || $morepicto);
$colspan = (4 + ($addcolumforpicto ? 1 : 0));
$colspanmore = 0;
// Show table // Show table
if ($genallowed) { if ($genallowed) {
$modellist = array(); $modellist = array();
@ -747,10 +751,6 @@ class FormFile
$out .= '<tr class="liste_titre">'; $out .= '<tr class="liste_titre">';
$addcolumforpicto = ($delallowed || $printer || $morepicto);
$colspan = (4 + ($addcolumforpicto ? 1 : 0));
$colspanmore = 0;
$out .= '<th colspan="'.$colspan.'" class="formdoc liste_titre maxwidthonsmartphone center">'; $out .= '<th colspan="'.$colspan.'" class="formdoc liste_titre maxwidthonsmartphone center">';
// Model // Model

View File

@ -1059,7 +1059,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$ret = $actioncomm->create($user); // User creating action $ret = $actioncomm->create($user); // User creating action
if ($ret > 0 && !empty($conf->global->MAIN_COPY_FILE_IN_EVENT_AUTO)) { if ($ret > 0 && !empty($conf->global->MAIN_COPY_FILE_IN_EVENT_AUTO)) {
if (is_array($object->attachedfiles) && array_key_exists('paths', $object->attachedfiles) && count($object->attachedfiles['paths']) > 0) { if (property_exists($object, 'attachedfiles') && is_array($object->attachedfiles) && array_key_exists('paths', $object->attachedfiles) && count($object->attachedfiles['paths']) > 0) {
foreach ($object->attachedfiles['paths'] as $key => $filespath) { foreach ($object->attachedfiles['paths'] as $key => $filespath) {
$srcfile = $filespath; $srcfile = $filespath;
$destdir = $conf->agenda->dir_output.'/'.$ret; $destdir = $conf->agenda->dir_output.'/'.$ret;