Bug #68636 [Asn->Csd]: setlocale no longer returns current value per category.

From: Date: Thu, 08 Jan 2015 22:42:39 +0000
Subject: Bug #68636 [Asn->Csd]: setlocale no longer returns current value per category.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189764@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68636&edit=1

 ID:                 68636
 Updated by:         dmitry@php.net
 Reported by:        arjen at react dot com
 Summary:            setlocale no longer returns current value per
                     category.
-Status:             Assigned
+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:

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).


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#189764) next »