Skip to content

Commit a2f3ec1

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents e05c6a2 + 619c4e9 commit a2f3ec1

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ PHP NEWS
1010
. Fixed bug #72175 (Impossibility of creating multiple connections to
1111
Interbase with php 7.x). (Nikita)
1212

13+
- Intl:
14+
. Fixed bug #77895 (IntlDateFormatter::create fails in strict mode if $locale
15+
= null). (Nikita)
16+
1317
- LDAP:
1418
. Fixed bug #77869 (Core dump when using server controls) (mcmic)
1519

ext/intl/dateformat/dateformat_create.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
7474
intl_error_reset(NULL);
7575
object = return_value;
7676
/* Parse parameters. */
77-
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "sll|zzs",
77+
if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "s!ll|zzs",
7878
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
7979
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
8080
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)