From: Nikita Popov Date: Sat, 10 Feb 2018 18:30:57 +0000 (+0100) Subject: Merge branch 'PHP-7.1' into PHP-7.2 X-Git-Tag: php-7.2.3RC1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee3f3a9d75393585c10df65a7d5bdd0512994bb8;p=php Merge branch 'PHP-7.1' into PHP-7.2 --- ee3f3a9d75393585c10df65a7d5bdd0512994bb8 diff --cc NEWS index 40240283c8,29806f95c8..fd26241ba9 --- a/NEWS +++ b/NEWS @@@ -9,6 -6,16 +9,10 @@@ PH . Fixed bug #75882 (a simple way for segfaults in threadsafe php just with configuration). (Anatol) + - Date: + . Fixed bug #75928 (Argument 2 for `DateTimeZone::listIdentifiers()` should + accept `null`). (Pedro Lacerda) + -- PGSQL: - . Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru) - -- ODBC: - . Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol) - - LDAP: . Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke) diff --cc ext/date/php_date.c index b65675cf62,4f92eabe38..ca65467456 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@@ -4741,15 -4701,13 +4741,15 @@@ PHP_FUNCTION(timezone_identifiers_list const timelib_tzdb *tzdb; const timelib_tzdb_index_entry *table; int i, item_count; - zend_long what = PHP_DATE_TIMEZONE_GROUP_ALL; + zend_long what = PHP_DATE_TIMEZONE_GROUP_ALL; char *option = NULL; - size_t option_len = 0; + size_t option_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ls!", &what, &option, &option_len) == FAILURE) { - RETURN_FALSE; - } + ZEND_PARSE_PARAMETERS_START(0, 2) + Z_PARAM_OPTIONAL + Z_PARAM_LONG(what) - Z_PARAM_STRING(option, option_len) ++ Z_PARAM_STRING_EX(option, option_len, 1, 0) + ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); /* Extra validation */ if (what == PHP_DATE_TIMEZONE_PER_COUNTRY && option_len != 2) {