Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed broken code in CHTTPRequest

fixes #3700
  • Loading branch information...
commit 147bc37c4741dc8aab8e1aadeb575dbe85a4e6ae 1 parent a0bf9f1
Carsten Brandt cebe authored
Showing with 2 additions and 1 deletion.
  1. +1 −0  CHANGELOG
  2. +1 −1  framework/web/CHttpRequest.php
1  CHANGELOG
View
@@ -5,6 +5,7 @@ Version 1.1.17 work in progress
-------------------------------
- Bug #3696: Fixed broken case insensitiveness for Active Record count expressions introduced with fixed #268 (xt99)
+- Bug #3700: Undefined variable `$acceptedLanguage` in `CHttpRequest::getPreferredLanguage()` (cebe,ddebin)
- Enh #3686: Wrapper div of hidden fields in CForm now have style `display:none` instead of `visibility:hidden` to not affect the layout (cebe, alaabadran)
Version 1.1.16 December 21, 2014
2  framework/web/CHttpRequest.php
View
@@ -1051,7 +1051,7 @@ public function getPreferredLanguage($languages=array())
foreach ($languages as $language) {
$language=CLocale::getCanonicalID($language);
// en_us==en_us, en==en_us, en_us==en
- if($language===$acceptedLanguage || strpos($acceptedLanguage,$language.'_')===0 || strpos($language,$acceptedLanguage.'_')===0) {
+ if($language===$preferredLanguage || strpos($preferredLanguage,$language.'_')===0 || strpos($language,$preferredLanguage.'_')===0) {
return $language;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.