diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-15 15:27:19 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-15 15:27:30 +0200 |
commit | a2f3ec17770d3fc4f995356c27b75adcc70c2cc9 (patch) | |
tree | e3080785551d553ac8ea92f7b85d42fcb17db7c0 | |
parent | e05c6a25f96da19a8578076e5861934af85c8fc7 (diff) | |
parent | 619c4e9f2e772557d3bdaa4e23f8392dc7f4c499 (diff) | |
download | php-git-a2f3ec17770d3fc4f995356c27b75adcc70c2cc9.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/intl/dateformat/dateformat_create.cpp | 2 | ||||
-rw-r--r-- | ext/intl/tests/bug77895.phpt | 13 |
3 files changed, 18 insertions, 1 deletions
@@ -10,6 +10,10 @@ PHP NEWS . Fixed bug #72175 (Impossibility of creating multiple connections to Interbase with php 7.x). (Nikita) +- Intl: + . Fixed bug #77895 (IntlDateFormatter::create fails in strict mode if $locale + = null). (Nikita) + - LDAP: . Fixed bug #77869 (Core dump when using server controls) (mcmic) diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index b85f10ecc9..2beddc2d3e 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -74,7 +74,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: " diff --git a/ext/intl/tests/bug77895.phpt b/ext/intl/tests/bug77895.phpt new file mode 100644 index 0000000000..18b4f778e6 --- /dev/null +++ b/ext/intl/tests/bug77895.phpt @@ -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) { +} |