diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php
index 20ae06c02ce0c..58e3e60b96739 100644
--- a/htdocs/compta/bank/various_payment/list.php
+++ b/htdocs/compta/bank/various_payment/list.php
@@ -33,7 +33,9 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
-require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+if (isModEnabled('project')) {
+ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+}
// Load translation files required by the page
$langs->loadLangs(array("compta", "banks", "bills", "accountancy"));
@@ -242,7 +244,7 @@
if ($arrayfields['bank']['checked']) {
$accountstatic = new Account($db);
}
-if ($arrayfields['project']['checked']) {
+if (isModEnabled('project') && $arrayfields['project']['checked']) {
$proj = new Project($db);
}
if ($arrayfields['entry']['checked']) {
@@ -538,7 +540,7 @@
}
// Project
-if ($arrayfields['project']['checked']) {
+if (isModEnabled('project') && $arrayfields['project']['checked']) {
print '
';
// TODO
print ' | ';
@@ -635,7 +637,7 @@
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
-if ($arrayfields['project']['checked']) {
+if (isModEnabled('project') && $arrayfields['project']['checked']) {
print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
@@ -702,7 +704,7 @@
$variousstatic->amount = $obj->amount;
$accountingaccount->fetch('', $obj->accountancy_code, 1);
- $variousstatic->accountancy_code = $accountingaccount->getNomUrl(0, 0, 1, $obj->accountingaccount, 1);
+ $variousstatic->accountancy_code = $accountingaccount->getNomUrl(0, 0, 1, $obj->accountancy_code, 1);
if ($mode == 'kanban') {
if ($i == 0) {
@@ -780,7 +782,7 @@
}
// Project
- if ($arrayfields['project']['checked']) {
+ if (isModEnabled('project') && $arrayfields['project']['checked']) {
print '';
if ($obj->fk_project > 0) {
$proj->fetch($obj->fk_project);
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index b8f63e352fc0f..302e60bfc9b21 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -160,6 +160,8 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $
$found = 0;
$out = '';
+ $this->content = ($this->content ?? ''); // to avoid htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
+
if (in_array($this->tool, array('textarea', 'ckeditor'))) {
$found = 1;
//$out.= ' |