]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.1' into PHP-7.2
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 10 Feb 2018 18:30:57 +0000 (19:30 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 10 Feb 2018 18:30:57 +0000 (19:30 +0100)
1  2 
NEWS
ext/date/php_date.c

diff --cc NEWS
index 40240283c8b66136d26f42119e62d7b2aa956262,29806f95c8cf28939724eefd7a18908ec590c988..fd26241ba99fb4c4ef98732400b50cf8d345108a
--- 1/NEWS
--- 2/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)
  
 -- 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)
 -
+ - Date:
+   . Fixed bug #75928 (Argument 2 for `DateTimeZone::listIdentifiers()` should
+     accept `null`). (Pedro Lacerda)
  - LDAP:
    . Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)
  
index b65675cf629089dd03ef137f92d40057d3dc2640,4f92eabe3838cec1570d003e71b28b886591338a..ca654674562bc63f32fe35f68e4389a59169c0d2
@@@ -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) {