diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 724ebae500bac..47f2c34b5e39a 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -71,15 +71,11 @@ @phan-var-force string $search_all '; -if (!isset($taskstatic) || !is_object($taskstatic)) { +if (!is_object($taskstatic ?? null)) { $taskstatic = null; } -if (!isset($trackid)) { - $trackid = ''; -} -if (!isset($modelmail)) { - $modelmail = ''; -} +$trackid = (string) ($trackid ?? ''); +$modelmail = (string) ($modelmail ?? ''); if (!empty($sall) || !empty($search_all)) { $search_all = empty($sall) ? $search_all : $sall; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 81b8c42866f12..1eaf227dfb2a9 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1065,7 +1065,7 @@ $linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss' => 'reposition marginleftonly')); //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1); - print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'projecttask', 0, '', '', $massactionbutton); + print load_fiche_titre($title, $linktotasks.'   '.$linktocreatetask, 'projecttask', 0, '', '', (string) ($massactionbutton ?? '')); $objecttmp = new Task($db); $trackid = 'task'.$taskstatic->id;