From 9660e9f0e08bf88cc9979b9d41fc5055683020a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Oct 2022 23:08:25 +0200 Subject: [PATCH] Fix warning --- htdocs/comm/action/card.php | 4 ++-- htdocs/core/lib/functions.lib.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 2c008202348..590d1bafe17 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1865,7 +1865,7 @@ if ($id > 0) { // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { - print ''.$langs->trans("Location").''; + print ''.$langs->trans("Location").''; } // Status @@ -1997,7 +1997,7 @@ if ($id > 0) { print ''; // Reminders - if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) { + if (getDolGlobalString('AGENDA_REMINDER_EMAIL') || getDolGlobalString('AGENDA_REMINDER_BROWSER')) { $filteruserid = $user->id; if ($user->rights->agenda->allactions->read) { $filteruserid = 0; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2a4bbf9f6f3..b45f6f895b3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3828,6 +3828,10 @@ function isValidPhone($phone) */ function dol_strlen($string, $stringencoding = 'UTF-8') { + if (is_null($string)) { + return 0; + } + if (function_exists('mb_strlen')) { return mb_strlen($string, $stringencoding); } else {