From d950a88257c15d9d5db5fbf16db4d0aa66b8d62f Mon Sep 17 00:00:00 2001 From: Tomasz Sawicki Date: Tue, 16 Feb 2016 19:54:45 +0100 Subject: [PATCH] Fix creating CURLFile --- src/Unirest/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unirest/File.php b/src/Unirest/File.php index 4ea2dbd..7db8182 100644 --- a/src/Unirest/File.php +++ b/src/Unirest/File.php @@ -14,7 +14,7 @@ class File public static function add($filename, $mimetype = '', $postname = '') { if (function_exists('curl_file_create')) { - return curl_file_create($filename, $mimetype = '', $postname = ''); + return curl_file_create($filename, $mimetype, $postname); } else { return sprintf('@%s;filename=%s;type=%s', $filename, $postname ?: basename($filename), $mimetype); }