From c257d77dc30e4652c819d4486dfadfd93ce89b28 Mon Sep 17 00:00:00 2001
From: BENKE Charlene <1179011+defrance@users.noreply.github.com>
Date: Sat, 28 May 2022 09:47:21 +0200
Subject: [PATCH 1/5] php V8 warning
---
htdocs/adherents/admin/member.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php
index ed2453ef793..bae229bc77b 100644
--- a/htdocs/adherents/admin/member.php
+++ b/htdocs/adherents/admin/member.php
@@ -108,7 +108,7 @@ if ($action == 'set_default') {
$res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity);
$res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
// Use vat for invoice creation
- if ($conf->facture->enabled) {
+ if (!empty($conf->facture->enabled)) {
$res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
@@ -256,7 +256,7 @@ print '';
print "\n";
// Use vat for invoice creation
-if ($conf->facture->enabled) {
+if (!empty($conf->facture->enabled)) {
print '
| '.$langs->trans("VATToUseForSubscriptions").' | ';
if (!empty($conf->banque->enabled)) {
print '';
From 0b3e32a2236f05f34c8dfa7fd6fe4a825a126f9b Mon Sep 17 00:00:00 2001
From: BENKE Charlene <1179011+defrance@users.noreply.github.com>
Date: Sat, 28 May 2022 09:52:03 +0200
Subject: [PATCH 2/5] fix php v8 warning
---
htdocs/contact/consumption.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
index dc4b56b2763..b7fc682d2c6 100644
--- a/htdocs/contact/consumption.php
+++ b/htdocs/contact/consumption.php
@@ -153,16 +153,16 @@ print ' |
';
if ($object->thirdparty->client) {
$thirdTypeArray['customer'] = $langs->trans("customer");
- if ($conf->propal->enabled && $user->rights->propal->lire) {
+ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
$elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals');
}
- if ($conf->commande->enabled && $user->rights->commande->lire) {
+ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
$elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders');
}
- if ($conf->facture->enabled && $user->rights->facture->lire) {
+ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
}
- if ($conf->contrat->enabled && $user->rights->contrat->lire) {
+ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
}
}
From 4c96921a5f38c8f31756cdf7e224ccd9fb07fe68 Mon Sep 17 00:00:00 2001
From: BENKE Charlene <1179011+defrance@users.noreply.github.com>
Date: Sat, 28 May 2022 09:54:59 +0200
Subject: [PATCH 3/5] php 8 fix warning
---
htdocs/core/class/html.formticket.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 5600f51f5e2..31a48f38cf4 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -346,7 +346,7 @@ class FormTicket
}
}
- if ($conf->knowledgemanagement->enabled) {
+ if (!empty($conf->knowledgemanagement->enabled)) {
// KM Articles
print '
';
print '
From b1c4aa07f09fb5cbb2de8c47c1542aada89ef77a Mon Sep 17 00:00:00 2001
From: BENKE Charlene <1179011+defrance@users.noreply.github.com>
Date: Sat, 28 May 2022 09:58:54 +0200
Subject: [PATCH 4/5] fix php 8 warning
---
htdocs/admin/stock.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index e8f59727c07..a5e83155f03 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -394,7 +394,7 @@ print "\n";
print "\n";
// Option to force stock to be enough before adding a line into document
-if ($conf->invoice->enabled) {
+if (!empty($conf->invoice->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForInvoice").' | ';
print '';
@@ -408,7 +408,7 @@ if ($conf->invoice->enabled) {
print " |
\n";
}
-if ($conf->order->enabled) {
+if (!empty($conf->order->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForOrder").' | ';
print '';
@@ -422,7 +422,7 @@ if ($conf->order->enabled) {
print " |
\n";
}
-if ($conf->expedition->enabled) {
+if (!empty($conf->expedition->enabled)) {
print '';
print '| '.$langs->trans("StockMustBeEnoughForShipment").' | ';
print '';
From eba9f695c20538aa179fb3d376a99c00c92f7cb6 Mon Sep 17 00:00:00 2001
From: BENKE Charlene <1179011+defrance@users.noreply.github.com>
Date: Sat, 28 May 2022 10:02:02 +0200
Subject: [PATCH 5/5] fix php 8 warning
---
htdocs/admin/emailcollector_card.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index d01b160ca31..50e3faa7d51 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2022 Charlene Benke
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -592,15 +593,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
'recordjoinpiece'=>'AttachJoinedDocumentsToObject',
'recordevent'=>'RecordEvent');
$arrayoftypesnocondition = $arrayoftypes;
- if ($conf->projet->enabled) {
+ if (!empty($conf->projet->enabled)) {
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
}
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
- if ($conf->ticket->enabled) {
+ if (!empty($conf->ticket->enabled)) {
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
}
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
- if ($conf->recruitment->enabled) {
+ if (!empty($conf->recruitment->enabled)) {
$arrayoftypes['candidature'] = 'CreateCandidature';
}
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
|