From 4ae928166e9152ee7b2c3ad8a4581a3c7f59c296 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jul 2010 20:52:00 +0000 Subject: [PATCH] Fix: Error with some external modules --- htdocs/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 1d2549d356d..e0a78458db0 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -951,7 +951,7 @@ function isValidEmail($address) /** - * Make a strlen call. Works even in mbstring module not enabled + * Make a strlen call. Works even if mbstring module not enabled. * * @param unknown_type $string * @param unknown_type $stringencoding @@ -961,7 +961,7 @@ function dol_strlen($string,$stringencoding='') { global $langs; - if (empty($stringencoding)) $stringencoding=$langs->charset_output; + if (empty($stringencoding)) $stringencoding=(empty($langs->charset_output)?'UTF-8':$langs->charset_output); $ret=''; if (function_exists('mb_strlen'))