Skip to content

Commit

Permalink
make locale_lookup 4th parameter optional
Browse files Browse the repository at this point in the history
Summary: Closes : facebook#6598
Closes facebook#6605

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2700468

Pulled By: JoelMarcey

fb-gh-sync-id: dd0bf39e8f2e8bd7f9ef7d5e3e4ed27bbb600bee
  • Loading branch information
Thomas Colomb authored and hhvm-bot committed Nov 27, 2015
1 parent b707c69 commit 1940228
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hphp/runtime/ext/icu/ext_icu_locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function locale_get_script(string $locale): mixed {
function locale_lookup(array $langtag,
string $locale,
bool $canonicalize = false,
string $default): string {
string $default = ""): string {
return Locale::lookup($langtag, $locale, $canonicalize, $default);
}

Expand Down
8 changes: 8 additions & 0 deletions hphp/test/slow/ext_icu/locale-lookup-two-params.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$arr = array(
'de-DEVA',
'de-DE-1996',
'de',
'de-De'
);
echo locale_lookup($arr, 'de-DE-1996-x-prv1-prv2');
1 change: 1 addition & 0 deletions hphp/test/slow/ext_icu/locale-lookup-two-params.php.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
de-DE-1996

0 comments on commit 1940228

Please sign in to comment.