From 946ef0f8543725db41ea374e8e67cd84a776d011 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Sun, 9 Oct 2005 16:29:57 +0000
Subject: [PATCH] un warning qui fait mauvais effet

---
 ecrire/inc_charsets.php3 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ecrire/inc_charsets.php3 b/ecrire/inc_charsets.php3
index 4622b5f9d0..5b9a3fd7df 100644
--- a/ecrire/inc_charsets.php3
+++ b/ecrire/inc_charsets.php3
@@ -212,8 +212,9 @@ function charset2unicode($texte, $charset='AUTO', $forcer = false) {
 		if (!isset($trans[$charset])) {
 			global $CHARSET;
 			load_charset($charset);
-			foreach ($CHARSET[$charset] as $key => $val) {
-				$trans[$charset][chr($key)] = '&#'.$val.';';
+			if (is_array($CHARSET[$charset]))
+				foreach ($CHARSET[$charset] as $key => $val) {
+					$trans[$charset][chr($key)] = '&#'.$val.';';
 			}
 		}
 		if (count($trans[$charset]))
-- 
GitLab