|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-07-11 05:03 UTC] jinmoku at hotmail dot com
Description:
------------
Locale::setDefault never failed even with wrong value
Test script:
---------------
var_dump(Locale::setDefault(''));
var_dump(Locale::setDefault(null));
var_dump(Locale::setDefault(false));
var_dump(Locale::setDefault(true));
var_dump(Locale::setDefault('en_US'));
Expected result:
----------------
bool(false)
bool(false)
bool(false)
bool(false)
bool(true)
Actual result:
--------------
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
Basically, Locale::setDefault($string) behaves the same as ini_set('intl.default_locale', $string)[1]. It is arguable whether this is a bug, but at least the documentation regarding the return value should be improved. [1] <http://3v4l.org/A3ooa>