diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 7c5d074d51e..42e0b84228f 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -535,7 +535,7 @@ if (empty($reshook)) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
}
- if ($conf->global->ADHERENT_MAIL_REQUIRED && !isValidEMail($email)) {
+ if (!empty($conf->global->ADHERENT_MAIL_REQUIRED) && !isValidEMail($email)) {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorBadEMail", $email), null, 'errors');
@@ -1032,7 +1032,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '';
// EMail
- print '
| '.($conf->global->ADHERENT_MAIL_REQUIRED ? '' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '' : '').' | ';
+ print '
| '.(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '' : '').$langs->trans("EMail").(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '' : '').' | ';
print ''.img_picto('', 'object_email').' |
';
// Website
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 033592a9afc..c27a4adeeac 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -379,12 +379,12 @@ if ($action == 'create') {
print '| '.$langs->trans("Description").' | ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('comment', $object->note, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
+ $doleditor = new DolEditor('comment', $object->note, '', 200, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
$doleditor->Create();
print ' |
| '.$langs->trans("WelcomeEMail").' | ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
+ $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
$doleditor->Create();
print ' |
';
@@ -812,12 +812,12 @@ if ($rowid > 0) {
print '| '.$langs->trans("Description").' | ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
+ $doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
$doleditor->Create();
print " |
";
print '| '.$langs->trans("WelcomeEMail").' | ';
- $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
+ $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
$doleditor->Create();
print " |
";
diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php
index e5d4de26278..d945efb6e34 100644
--- a/htdocs/core/actions_massactions.inc.php
+++ b/htdocs/core/actions_massactions.inc.php
@@ -1547,7 +1547,7 @@ if (!$error && ($massaction == 'disable' || ($action == 'disable' && $confirm ==
$parameters['toselect'] = $toselect;
$parameters['uploaddir'] = $uploaddir;
$parameters['massaction'] = $massaction;
-$parameters['diroutputmassaction'] = $diroutputmassaction;
+$parameters['diroutputmassaction'] = empty($diroutputmassaction) ? '' : $diroutputmassaction;
$reshook = $hookmanager->executeHooks('doMassActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php
index 5915fb8a633..16a90025a7a 100644
--- a/htdocs/core/tpl/extrafields_edit.tpl.php
+++ b/htdocs/core/tpl/extrafields_edit.tpl.php
@@ -43,7 +43,7 @@ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object,
print $hookmanager->resPrint;
if (empty($reshook)) {
$params = array();
- $params['cols'] = $parameters['colspanvalue'];
+ $params['cols'] = empty($parameters['colspanvalue']) ? '' : $parameters['colspanvalue'];
print $object->showOptionals($extrafields, 'edit', $params);
}