Bug #55173 [Opn->Ver]: Locale::setDefault never failed

From: Date: Wed, 24 Jun 2015 21:17:00 +0000
Subject: Bug #55173 [Opn->Ver]: Locale::setDefault never failed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193857@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55173&edit=1 ID: 55173 Updated by: cmb@php.net Reported by: jinmoku at hotmail dot com Summary: Locale::setDefault never failed -Status: Open +Status: Verified Type: Bug Package: I18N and L10N related -Operating System: Win 7 +Operating System: * -PHP Version: 5.3.6 +PHP Version: 5.6.10 Block user comment: N Private report: N New Comment: 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> Previous Comments: ------------------------------------------------------------------------ [2011-07-11 05:49:23] jinmoku at hotmail dot com you don't use uloc_setDefault ??? ------------------------------------------------------------------------ [2011-07-11 05:03:51] 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) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55173&edit=1

« previous php.bugs (#193857) next »