From be5ee63ad1e1247100b402a323d1a73d9a98c8af Mon Sep 17 00:00:00 2001 From: frankdee Date: Mon, 14 Dec 2015 19:17:31 +0100 Subject: [PATCH] shortened cURL options array merging --- src/Unirest/Request.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Unirest/Request.php b/src/Unirest/Request.php index 5f04406..50b744d 100755 --- a/src/Unirest/Request.php +++ b/src/Unirest/Request.php @@ -566,10 +566,7 @@ private static function getHeaderString($key, $val) */ private static function mergeCurlOptions(&$existing_options, $new_options) { - foreach($new_options as $key => $value){ - $existing_options[$key] = $value; - } - + $existing_options = $new_options + $existing_options; return $existing_options; } }