From:             tokul at users dot sourceforge dot net
Operating system: Linux Debian Etch
PHP version:      6CVS-2007-08-29 (snap)
PHP Bug Type:     I18N and L10N related
Bug description:  locale_set_default returns true on invalid locales

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 bug report at http://bugs.php.net/?id=42471&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42471&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42471&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42471&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42471&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42471&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42471&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42471&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42471&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42471&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42471&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42471&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42471&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42471&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42471&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42471&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42471&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42471&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42471&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42471&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42471&r=mysqlcfg

Reply via email to