php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3957 setlocale doesn't recognize LC_MESSAGES
Submitted: 2000-03-29 08:19 UTC Modified: 2000-06-17 08:28 UTC
From: Michael dot Mraka at GTSgroup dot cz Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 4 Patch Level 1 OS: All
Private report: No CVE-ID: None
 [2000-03-29 08:19 UTC] Michael dot Mraka at GTSgroup dot cz
setlocale function (from ext/standard/string.c) doesn't recognize LC_MESSAGES category

Here is a simple patch:
--- php-4.0b4pl1/ext/standard/string.c.orig     Wed Mar 29 14:58:39 2000
+++ php-4.0b4pl1/ext/standard/string.c  Wed Mar 29 14:59:46 2000
@@ -2087,6 +2087,8 @@
                cat = LC_COLLATE;
        else if (!strcasecmp ("LC_CTYPE", category->value.str.val))
                cat = LC_CTYPE;
+       else if (!strcasecmp ("LC_MESSAGES", category->value.str.val))
+               cat = LC_MESSAGES;
        else if (!strcasecmp ("LC_MONETARY", category->value.str.val))
                cat = LC_MONETARY;
        else if (!strcasecmp ("LC_NUMERIC", category->value.str.val))
@@ -2094,7 +2096,7 @@
        else if (!strcasecmp ("LC_TIME", category->value.str.val))
                cat = LC_TIME;
        else {
-               php_error(E_WARNING,"Invalid locale category name %s, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC or LC_TIME", category->value.str.val);
+               php_error(E_WARNING,"Invalid locale category name %s, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_MESSAGES, LC_NUMERIC or LC_TIME", category->value.str.val);
                RETURN_FALSE;
        }
        if (!strcmp ("0", locale->value.str.val))

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-17 08:28 UTC] hholzgra at cvs dot php dot net
fixed in CVS for 4.0.1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 09:01:28 2024 UTC