Merge pull request #7 from xdrew/master

Pass by reference notice fix
This commit is contained in:
Jack W
2016-09-13 07:38:26 +01:00
committed by GitHub

View File

@@ -138,9 +138,9 @@ class Vkontakte extends AbstractProvider
protected function checkResponse(ResponseInterface $response, $data) protected function checkResponse(ResponseInterface $response, $data)
{ {
// Metadata info // Metadata info
$contentType = $response->getHeader('Content-Type'); $contentTypeRaw = $response->getHeader('Content-Type');
/** @noinspection PhpPassByRefInspection */ $contentTypeArray = explode(';', reset($contentTypeRaw));
$contentType = reset((explode(';', reset($contentType)))); $contentType = reset($contentTypeArray);
// Response info // Response info
$responseCode = $response->getStatusCode(); $responseCode = $response->getStatusCode();
$responseMessage = $response->getReasonPhrase(); $responseMessage = $response->getReasonPhrase();