mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
This commit is contained in:
commit
2d7d5ab5c6
2 changed files with 14 additions and 1 deletions
|
@ -70,7 +70,7 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
|
|||
intl_error_reset(NULL);
|
||||
object = return_value;
|
||||
/* Parse parameters. */
|
||||
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "sll|zzs",
|
||||
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "s!ll|zzs",
|
||||
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
|
||||
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "
|
||||
|
|
13
ext/intl/tests/bug77895.phpt
Normal file
13
ext/intl/tests/bug77895.phpt
Normal file
|
@ -0,0 +1,13 @@
|
|||
--TEST--
|
||||
Bug #77895: IntlDateFormatter::create fails in strict mode if $locale = null
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
var_dump(IntlDateFormatter::create(null, IntlDateFormatter::NONE, IntlDateFormatter::NONE));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(IntlDateFormatter)#1 (0) {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue