From b1d762eb18bdbdb44089fc1a4b18bf9e0839b91d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Jul 2022 09:37:15 +0200 Subject: [PATCH] Fix php8.1 --- htdocs/website/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 2a5f4cc59fe..1d5d0a35be1 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4318,8 +4318,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $massactionbutton .= ''; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - //$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + + //$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields + $selectedfields = ''; + $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print_barre_liste($langs->trans("Results"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1, 1, 1); @@ -4369,7 +4371,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $totalnbwords = 0; foreach ($listofpages['list'] as $answerrecord) { - if (get_class($answerrecord) == 'WebsitePage') { + if (is_object($answerrecord) && get_class($answerrecord) == 'WebsitePage') { print ''; // Type of container