diff --git a/lib/api/source/sync.php b/lib/api/source/sync.php index 930a22c..48507b0 100755 --- a/lib/api/source/sync.php +++ b/lib/api/source/sync.php @@ -46,7 +46,7 @@ if( is_null($data) ){ slog("api:fetch returned unreadable content", 'api:sync'); - $data = "{}"; + $data = []; } @@ -67,7 +67,7 @@ /* (1) Set post data */ $postarray = [ 'token' => $hash, - 'data' => $data + 'data' => json_encode($data) ]; /* (2) Add renew if renew */ @@ -90,10 +90,9 @@ /* [4] Manage headers =========================================================*/ - curl_setopt($curl, CURLOPT_HTTPHEADER, [ - "Content-Type: multipart/form-data; boundary=$boundary", - "Content-Length: ".strlen($postraw) - ]); + #curl_setopt($curl, CURLOPT_HTTPHEADER, [ + # "Content-Type: multipart/form-data" + #]); /* [5] Send and catch request response