]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorXinchen Hui <laruence@php.net>
Fri, 27 Feb 2015 03:13:07 +0000 (11:13 +0800)
committerXinchen Hui <laruence@php.net>
Fri, 27 Feb 2015 03:13:07 +0000 (11:13 +0800)
Conflicts:
ext/date/php_date.c

1  2 
ext/date/php_date.c

index 4b6deaf648873bed9cd215b8b8b8fd6b4eaad398,a3f8735433df673ad055979ac0eae3efce5cf8e8..fbc4f85205cf7a15b8d4d6d74dc60917f841fcca
@@@ -3660,17 -3735,14 +3660,20 @@@ PHP_METHOD(DateTimeZone, __construct
  }
  /* }}} */
  
 -static int php_date_timezone_initialize_from_hash(zval **return_value, php_timezone_obj **tzobj, HashTable *myht TSRMLS_DC)
 +static int php_date_timezone_initialize_from_hash(zval **return_value, php_timezone_obj **tzobj, HashTable *myht) /* {{{ */
  {
 -      zval            **z_timezone = NULL;
 -      zval            **z_timezone_type = NULL;
 +      zval            *z_timezone;
 +      zval            *z_timezone_type;
  
-       if ((z_timezone_type = zend_hash_str_find(myht, "timezone_type", sizeof("timezone_type")-1)) != NULL) {
-               if ((z_timezone = zend_hash_str_find(myht, "timezone", sizeof("timezone")-1)) != NULL) {
-                       if(Z_TYPE_P(z_timezone_type) != IS_LONG) {
 -      if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) {
 -              if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS && Z_TYPE_PP(z_timezone) == IS_STRING) {
 -                      if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) {
++      if ((z_timezone_type = zend_hash_str_find(myht, "timezone_type", sizeof("timezone_type") - 1)) != NULL) {
++              if ((z_timezone = zend_hash_str_find(myht, "timezone", sizeof("timezone") - 1)) != NULL) {
++                      if (Z_TYPE_P(z_timezone_type) != IS_LONG) {
++                              return FAILURE;
++                      }
++                      if (Z_TYPE_P(z_timezone) != IS_STRING) {
 +                              return FAILURE;
 +                      }
 +                      if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone))) {
                                return SUCCESS;
                        }
                }