summaryrefslogtreecommitdiffstats
path: root/system/libraries/User_agent.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-05 21:30:22 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-05 21:30:22 +0100
commita070db9c481346b4f9884bd32c3d1445a795f7a8 (patch)
treee44b9aff733228c9740c44c612f7c314b30d9dfb /system/libraries/User_agent.php
parent1a2cbdf2ec852bfe9b122ebf47fb6fb0216f38ca (diff)
added strtolower into charset and lang test
Diffstat (limited to 'system/libraries/User_agent.php')
-rw-r--r--system/libraries/User_agent.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 67a3c2b88..f80bb0bbf 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', '', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']));
+ $languages = preg_replace('/(;q=.+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])));
$this->languages = explode(',', $languages);
}
@@ -279,7 +279,7 @@ class CI_User_agent {
{
if ((count($this->charsets) == 0) AND isset($_SERVER['HTTP_ACCEPT_CHARSET']) AND $_SERVER['HTTP_ACCEPT_CHARSET'] != '')
{
- $charsets = preg_replace('/(;q=.+)/i', '', trim($_SERVER['HTTP_ACCEPT_CHARSET']));
+ $charsets = preg_replace('/(;q=.+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_CHARSET'])));
$this->charsets = explode(',', $charsets);
}