From 86abae953843715fab4a3bccb98f7c9eb6d3bc13 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 22 Jan 2008 07:35:40 +0000 Subject: Fixed a bug (#3015) in the User Agent library where more then 2 languages where not reported with languages(). --- system/libraries/User_agent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 9fa45c8a5..ff6d4a933 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -256,7 +256,7 @@ class CI_User_agent { { if ((count($this->languages) == 0) AND isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) AND $_SERVER['HTTP_ACCEPT_LANGUAGE'] != '') { - $languages = preg_replace('/(;q=.+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE']))); + $languages = preg_replace('/(;q=[0-9\.]+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE']))); $this->languages = explode(',', $languages); } -- cgit v1.2.3-24-g4f1b