-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
372 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1538,7 +1538,7 @@ PHP_FUNCTION(locale_lookup) | |
|
||
intl_error_reset( NULL ); | ||
|
||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS", &arr, &loc_range, &loc_range_len, | ||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS!", &arr, &loc_range, &loc_range_len, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nikic
Author
Member
|
||
&boolCanonical, &fallback_loc_str) == FAILURE) { | ||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_lookup: unable to parse input params", 0 ); | ||
RETURN_FALSE; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
IntlBreakIterator::getLocale(): basic test | ||
--SKIPIF-- | ||
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?> | ||
<?php if (version_compare(INTL_ICU_VERSION, '64.0') < 0) die('skip for ICU >= 64.0'); ?> | ||
--FILE-- | ||
<?php | ||
ini_set("intl.error_level", E_WARNING); | ||
ini_set("intl.default_locale", "pt_PT"); | ||
|
||
$bi = IntlBreakIterator::createSentenceInstance('pt'); | ||
|
||
var_dump($bi->getLocale(0)); | ||
var_dump($bi->getLocale(1)); | ||
?> | ||
==DONE== | ||
--EXPECT-- | ||
string(0) "" | ||
string(2) "pt" | ||
==DONE== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Thanks for getting hands on this, Nikita. We were just getting to the ICU upgrades, too. A question in this regard - this patch should likely land in 7.2. Regarding that, the ZPP change for sure doesn't belong in 7.2/7.3. Is there something specific preventing leave it as is in 7.2?
Thanks.