summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-16 11:19:52 -0700
committerBrion Vibber <brion@pobox.com>2009-10-16 11:19:52 -0700
commit21e17e3738a3c026dd8efb6558ae5124cbaf3c61 (patch)
treec309e503dde84de221069518c51e83b7e96c101b
parent531c0738daab2d5f9b8324b85b45af7131aec0da (diff)
Fix a logic error in php-gettext's setlocale() check; if setlocale() failed to return, we fall back to checking LANG environment variable. Now actually works when doing a setlocale *check* instead of a *set*.
Submitting fix upstream, but as the package is currently unmaintained it may not make it in.
-rw-r--r--extlib/php-gettext/gettext.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extlib/php-gettext/gettext.inc b/extlib/php-gettext/gettext.inc
index fcaafe7c9..7c95e40ec 100644
--- a/extlib/php-gettext/gettext.inc
+++ b/extlib/php-gettext/gettext.inc
@@ -129,7 +129,7 @@ function _setlocale($category, $locale) {
$ret = 0;
if (function_exists('setlocale')) // I don't know if this ever happens ;)
$ret = setlocale($category, $locale);
- if (($ret and $locale == '') or ($ret == $locale)) {
+ if ($ret and ($locale == '' or $ret == $locale)) {
$EMULATEGETTEXT = 0;
$CURRENTLOCALE = $ret;
} else {