#48572 [Asn]: Locale::lookup doesn't return default value

From: Date: Wed, 01 Jul 2009 22:18:49 +0000
Subject: #48572 [Asn]: Locale::lookup doesn't return default value
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2445@lists.php.net to get a copy of this message
 ID:               48572
 Updated by:       stas@php.net
 Reported By:      a dot schilder at gmx dot net
 Status:           Assigned
-Bug Type:         I18N and L10N related
+Bug Type:         Documentation problem
 Operating System: Windows XP
 PHP Version:      5.3.0RC3
 Assigned To:      stas
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2009-06-16 19:04:18] 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)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48572&edit=1



Thread (3 messages)

« previous php.doc.bugs (#2445) next »