fix cainfo default configuration; fix array_merge
authorMichael Wallner <mike@php.net>
Wed, 21 Jan 2015 20:56:56 +0000 (21:56 +0100)
committerMichael Wallner <mike@php.net>
Wed, 21 Jan 2015 20:56:56 +0000 (21:56 +0100)
php_http_client_curl.c
php_http_misc.c

index 6928945a4ab502ce20eca1661b68feca7fa16641..9881301c3dce2c62b75fe04358d69adcd71ee9ca 100644 (file)
@@ -1346,7 +1346,7 @@ static void php_http_curle_options_init(php_http_options_t *registry)
                        opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
                        opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR;
 #ifdef PHP_HTTP_CURL_CAINFO
-                       ZVAL_STRING(&opt->defval, PHP_HTTP_CURL_CAINFO);
+                       ZVAL_PSTRING(&opt->defval, PHP_HTTP_CURL_CAINFO);
 #endif
                }
                if ((opt = php_http_option_register(registry, ZEND_STRL("capath"), CURLOPT_CAPATH, IS_STRING))) {
index ff0c02475d204075ef18547792d50de54cd5ee9e..1344726ce2fe60d5bda46c4b9f88e095810f5ad5 100644 (file)
@@ -226,7 +226,7 @@ int php_http_array_apply_merge_func(zval *value, int num_args, va_list args, zen
                        convert_to_string_ex(value);
                }
 
-               Z_ADDREF_P(value);
+               Z_TRY_ADDREF_P(value);
 
                if ((flags & ARRAY_JOIN_PRETTIFY) && hash_key->key) {
                        key = php_http_pretty_key(estrndup(hash_key->key->val, hash_key->key->len), hash_key->key->len, 1, 1);