Fix PUT with empty POST data returning inode/x-empty instead of image/png

This commit is contained in:
Zach Borboa
2016-01-16 02:29:07 -08:00
parent 67020c98cc
commit 9372c4af3b
+3 -1
View File
@@ -544,7 +544,9 @@ class Curl
if (empty($this->options[CURLOPT_INFILE]) && empty($this->options[CURLOPT_INFILESIZE])) {
$this->setHeader('Content-Length', strlen($put_data));
}
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
if (!empty($put_data)) {
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
}
return $this->exec();
}