diff --git a/src/MsGraphAdmin.php b/src/MsGraphAdmin.php index bc5fac2..2e1e9ca 100755 --- a/src/MsGraphAdmin.php +++ b/src/MsGraphAdmin.php @@ -189,6 +189,10 @@ protected function guzzle($type, $request, $data = []) ], 'body' => json_encode($data), ]); + + if ($resonse == null) { + return null; + } return json_decode($response->getBody()->getContents(), true); @@ -204,6 +208,10 @@ protected static function dopost($url, $params) try { $client = new Client; $response = $client->post($url, ['form_params' => $params]); + + if ($resonse == null) { + return null; + } return json_decode($response->getBody()->getContents());