Skip to content

Commit 2d7d5ab

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
2 parents ca8f563 + a2f3ec1 commit 2d7d5ab

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ext/intl/dateformat/dateformat_create.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
7070
intl_error_reset(NULL);
7171
object = return_value;
7272
/* Parse parameters. */
73-
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "sll|zzs",
73+
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "s!ll|zzs",
7474
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
7575
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
7676
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "

ext/intl/tests/bug77895.phpt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
Bug #77895: IntlDateFormatter::create fails in strict mode if $locale = null
3+
--FILE--
4+
<?php
5+
6+
declare(strict_types=1);
7+
8+
var_dump(IntlDateFormatter::create(null, IntlDateFormatter::NONE, IntlDateFormatter::NONE));
9+
10+
?>
11+
--EXPECT--
12+
object(IntlDateFormatter)#1 (0) {
13+
}

0 commit comments

Comments
 (0)