Skip to content

Commit

Permalink
Update RequestsConnection.php (#1)
Browse files Browse the repository at this point in the history
Fix for post requests
  • Loading branch information
cleeve authored and bajb committed Nov 18, 2019
1 parent 3b7f074 commit 067f422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Connections/RequestsConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function load(IApiRequest $request)
{
$headers = $this->_buildHeaders($req);
$data = $this->_buildData($req);
if(empty(array_filter($data)))
if(!$data || (is_array($data) && empty(array_filter($data))))
{
// Prevent 411 errors from some servers
$headers['Content-Length'] = 0;
Expand Down

0 comments on commit 067f422

Please sign in to comment.