From 464808fb43c82ebb4beb3cd524651b4464315edf Mon Sep 17 00:00:00 2001 From: webchick Date: Thu, 12 Apr 2012 00:17:28 -0700 Subject: Issue #1513520 by pdrake, plach: Fixed locale_language_from_browser() incorrectly matches invalid strings. --- modules/locale/locale.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 40502a29a..ffda6f580 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -1668,6 +1668,7 @@ class LocaleBrowserDetectionTest extends DrupalUnitTestCase { 'EN' => 'en', ' en' => 'en', 'en ' => 'en', + 'en, fr' => 'en', // A less specific language from the browser matches a more specific one // from the website, and the other way around for compatibility with @@ -1702,6 +1703,7 @@ class LocaleBrowserDetectionTest extends DrupalUnitTestCase { // Unresolvable cases. '' => FALSE, 'de,pl' => FALSE, + 'iecRswK4eh' => FALSE, $this->randomName(10) => FALSE, ); -- cgit v1.2.3