From a81271b8ca39c58ed11548d8ae4ca7730a4a7d74 Mon Sep 17 00:00:00 2001 From: eldy Date: Tue, 20 Sep 2011 13:44:43 +0200 Subject: [PATCH] Fix: Missing conf --- htdocs/lib/functions.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 2b56ceabceb..727a03690ef 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -4030,11 +4030,14 @@ function utf8_check($str) /** * Return an UTF-8 string encoded into OS filesystem encoding. This function is used to define * value to pass to filesystem PHP functions. - * @param $str String to encode (UTF-8) - * @return string Encoded string (UTF-8, ISO-8859-1) + * + * @param string $str String to encode (UTF-8) + * @return string Encoded string (UTF-8, ISO-8859-1) */ function dol_osencode($str) { + global $conf; + $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp)) $tmp='utf-8'; // By default for other