X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Flanguages.php;h=97eeb095a30b69ca575e2100e28605b39c3c7af2;hp=342b9336af15c1cfeb299c036017d61004a64eb8;hb=06783280842a90181b2e984bd8ea13e3b7466edb;hpb=bb27e0c3c1046bc2e6f63aac5ed105d28dc17a36 diff --git a/include/languages.php b/include/languages.php index 342b933..97eeb09 100644 --- a/include/languages.php +++ b/include/languages.php @@ -72,11 +72,11 @@ function sq_textdomain($domain) { * @see http://www.php.net/setlocale */ function sq_setlocale($category,$locale) { - // string with only one locale - if (is_string($locale)) - return setlocale($category,$locale); - - if (! check_php_version(4,3)) { + if (is_string($locale)) { + // string with only one locale + $ret = setlocale($category,$locale); + } elseif (! check_php_version(4,3)) { + // older php version (second setlocale argument must be string) $ret=false; $index=0; while ( ! $ret && $index