Bug #68636 [NEW]: setlocale no longer returns current value per category.
| From: | arjen at react dot com | Date: | Tue, 23 Dec 2014 10:51:21 +0000 |
| Subject: | Bug #68636 [NEW]: setlocale no longer returns current value per category. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-189153@lists.php.net to get a copy of this message | ||
From: arjen at react dot com
Operating system: Linux
PHP version: master-Git-2014-12-23 (Git)
Package: Strings related
Bug Type: Bug
Bug description:setlocale no longer returns current value per category.
Description:
------------
setlocale used to return current locale per category when passing null
or "0" as locale, but now it's returning the latest set locale.
The actual value for LC_TIME is still 'en_US.UTF8', it's only reporting
the wrong value.
Regression since
https://github.com/php/php-src/commit/4514ba016ff158cd113deef1a215fcdcb6913b48
Test script:
---------------
var_dump(setlocale(LC_TIME, 'en_US.UTF8'));
var_dump(setlocale(LC_NUMERIC, 'C'));
var_dump(setlocale(LC_TIME, 0));
Expected result:
----------------
string(10) "en_US.UTF8"
string(1) "C"
string(10) "en_US.UTF8"
Actual result:
--------------
string(10) "en_US.UTF8"
string(1) "C"
string(1) "C"
--
Edit bug report at https://bugs.php.net/bug.php?id=68636&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68636&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68636&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68636&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68636&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68636&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68636&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68636&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68636&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68636&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68636&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68636&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68636&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68636&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68636&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68636&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68636&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68636&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68636&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68636&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68636&r=mysqlcfg