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); }