Bug #42471 [Opn->Wfx]: locale_set_default returns true on invalid locales
| From: | felipe@php.net | Date: | Sun, 20 Jun 2010 18:09:01 +0000 |
| Subject: | Bug #42471 [Opn->Wfx]: locale_set_default returns true on invalid locales | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151668@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=42471&edit=1
ID: 42471
Updated by: felipe@php.net
Reported by: tokul at users dot sourceforge dot net
Summary: locale_set_default returns true on invalid locales
-Status: Open
+Status: Wont fix
Type: Bug
Package: I18N and L10N related
Operating System: Linux Debian Etch
PHP Version: 6CVS-2007-08-29 (snap)
New Comment:
This just occurred in the old trunk.
Previous Comments:
------------------------------------------------------------------------
[2007-08-29 16:00:39] tokul at users dot sourceforge dot net
Description:
------------
locale_set_default() function returns true on invalid locale names. I
know that you have UTODO tag there, but this tag is there for 2 years
and link to mailing list refers to some unrelated spam message
One more comment.
I strongly recommend removing php_error(E_WARNING,....) call in PHP
locale_set_default() function. It will cause debugging issues. If
application cares about locale_set_default() results, it will check
return code and will be forced to suppress all locale_set_default()
errors in order to avoid E_WARNING error notice. If application does not
care about it, it still has to suppress this warning. Increased level of
noise prevents normal use of interpreter. Scripts have to choose between
turning off all notices or adding @ in front of any over-noisy php
function.
Reproduce code:
---------------
var_dump(locale_set_default('bogus'));
Expected result:
----------------
bool(false)
Actual result:
--------------
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=42471&edit=1