php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48572 Locale::lookup doesn't return default value
Submitted: 2009-06-16 19:04 UTC Modified: 2009-07-02 00:44 UTC
From: a dot schilder at gmx dot net Assigned: stas (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.0RC3 OS: Windows XP
Private report: No CVE-ID: None
 [2009-06-16 19:04 UTC] a dot schilder at gmx dot net
Description:
------------
If no valid locale can be found, the default value is not returned.

Reproduce code:
---------------
<?php

echo Locale::lookup(array('it_IT'), 'de_DE', 'en_UK');

?>

Expected result:
----------------
en_UK

Actual result:
--------------
(nothing)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-01 22:18 UTC] stas@php.net
Sorry, docs are wrong - it should be:

echo Locale::lookup(array('it_IT'), 'de_DE', false, 'en_UK');

(one param is missing). I will fix the docs.
 [2009-07-02 00:44 UTC] stas@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 21:01:33 2025 UTC