Skip to content

Commit 8727a7f

Browse files
committed
Update ResponseMediator to use type conversion, closes #263
1 parent 8592103 commit 8727a7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Github/HttpClient/Message/ResponseMediator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function getContent(Response $response)
2121

2222
public static function getPagination(Response $response)
2323
{
24-
$header = $response->getHeader('Link');
24+
$header = (string) $response->getHeader('Link');
2525

2626
if (empty($header)) {
2727
return null;
@@ -41,7 +41,7 @@ public static function getPagination(Response $response)
4141

4242
public static function getApiLimit(Response $response)
4343
{
44-
$remainingCalls = $response->getHeader('X-RateLimit-Remaining');
44+
$remainingCalls = (string) $response->getHeader('X-RateLimit-Remaining');
4545

4646
if (null !== $remainingCalls && 1 > $remainingCalls) {
4747
throw new ApiLimitExceedException($remainingCalls);

0 commit comments

Comments
 (0)