Bug #68636 [Com]: setlocale no longer returns current value per category.
Edit report at https://bugs.php.net/bug.php?id=68636&edit=1
ID: 68636
Comment by: tqz49679 at zwoho dot com
Reported by: arjen at react dot com
Summary: setlocale no longer returns current value per
category.
Status: Closed
Type: Bug
Package: Strings related
Operating System: Linux
PHP Version: master-Git-2014-12-23 (Git)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
This is expensive
Previous Comments:
------------------------------------------------------------------------
[2016-07-20 11:40:01] davey@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7b4808a6471655b44e65cfb4585c01f2efea444a
Log: Fixed bug #68636 (setlocale no longer returns current value per category).
------------------------------------------------------------------------
[2015-01-08 22:42:38] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7b4808a6471655b44e65cfb4585c01f2efea444a
Log: Fixed bug #68636 (setlocale no longer returns current value per category).
------------------------------------------------------------------------
[2015-01-07 22:44:22] danack@php.net
Hi,
The commit was from Dmitry, so assigning it to him.
------------------------------------------------------------------------
[2014-12-23 10:51:19] arjen at react dot com
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 this bug report at https://bugs.php.net/bug.php?id=68636&edit=1
Thread (5 messages)