From ec56667f5ea8969536ffc83bcfd1ec9fd387c0e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Feb 2015 09:44:22 +0100 Subject: [PATCH] Fix: [ bug #1849 ] Broken flag image when a contact does not have a country set --- htdocs/core/lib/functions.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3bded45bc9f..0c24e5fba72 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4305,6 +4305,8 @@ function picto_from_langcode($codelang) { global $langs; + if (empty($codelang)) return ''; + if ($codelang == 'auto') { return img_picto_common($langs->trans('AutoDetectLang'), 'flags/int.png');