From cb6be27b124cd96b207a740ee46bc07800c81139 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 6 May 2016 11:07:42 +0000 Subject: [PATCH] check if class Locale exists before using it --- preferences/inc/class.preferences_hooks.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preferences/inc/class.preferences_hooks.inc.php b/preferences/inc/class.preferences_hooks.inc.php index 5a3a207d47..58e0afb2fb 100644 --- a/preferences/inc/class.preferences_hooks.inc.php +++ b/preferences/inc/class.preferences_hooks.inc.php @@ -96,7 +96,7 @@ class preferences_hooks if (empty($lang)) $lang = 'en'; } list(,$country) = explode('-',$lang); - if (empty($country)) $country = Locale::getRegion(Locale::getDefault()); + if (empty($country) && class_exists('Locale')) $country = Locale::getRegion(Locale::getDefault()); if (empty($country)) $country = 'de'; // check for old rte_font_size pref including px and split it in size and unit