From f497f4d6e920baef854dc700d9c8a6ea4d23756c Mon Sep 17 00:00:00 2001 From: hystepik Date: Fri, 3 Mar 2023 16:45:21 +0100 Subject: [PATCH] Fix : php 8.0 warnings --- .../compta/paiement/class/paiement.class.php | 5 ++-- .../conferenceorboothattendee_card.php | 13 +++++---- .../conferenceorboothattendee_list.php | 28 +++++++++---------- htdocs/projet/element.php | 2 +- htdocs/projet/tasks/task.php | 1 + htdocs/user/group/list.php | 1 + 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 373fa2d5175..a473f06cd04 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -275,9 +275,8 @@ class Paiement extends CommonObject return -1; } if (empty($currencyofpayment)) { - $currencyofpayment = $this->multicurrency_code[$key]; - } - if ($currencyofpayment != $this->multicurrency_code[$key]) { + $currencyofpayment = isset($this->multicurrency_code[$key]) ? $this->multicurrency_code[$key] : ""; + } else if ($currencyofpayment != $this->multicurrency_code[$key]) { // If we have invoices with different currencies in the payment, we stop here $this->error = 'ErrorYouTryToPayInvoicesWithDifferentCurrenciesInSamePayment'; return -1; diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php index 9bab2a7f49d..cb31eb4ac62 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_card.php +++ b/htdocs/eventorganization/conferenceorboothattendee_card.php @@ -47,7 +47,8 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); +$mode = GETPOST('mode', 'alpha'); $conf_or_booth_id = GETPOST('conforboothid', 'int'); $fk_project = GETPOST('fk_project', 'int'); @@ -233,7 +234,7 @@ if (!empty($withproject)) { // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) { + if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { $morehtmlref .= '
'.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= ''; @@ -384,7 +385,7 @@ if (!empty($withproject)) { //print ''; print ''; $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id; - $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5'); + $encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5'); $linksuggest .= '&securekey='.urlencode($encodedsecurekey); //print '