Skip to content

Commit

Permalink
Fix PHP 8.1 issues (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Dec 2, 2021
1 parent 85cf170 commit eb2d0c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/EntryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function generateAvatar()
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return collect([
Expand Down
2 changes: 1 addition & 1 deletion src/Watchers/ClientRequestWatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function response(Response $response)
: 'Purged By Telescope';
}

if (Str::startsWith(strtolower($response->header('Content-Type')), 'text/plain')) {
if (Str::startsWith(strtolower($response->header('Content-Type') ?? ''), 'text/plain')) {
return $this->contentWithinLimits($content) ? $content : 'Purged By Telescope';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Watchers/RequestWatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected function response(Response $response)
: 'Purged By Telescope';
}

if (Str::startsWith(strtolower($response->headers->get('Content-Type')), 'text/plain')) {
if (Str::startsWith(strtolower($response->headers->get('Content-Type') ?? ''), 'text/plain')) {
return $this->contentWithinLimits($content) ? $content : 'Purged By Telescope';
}
}
Expand Down

0 comments on commit eb2d0c6

Please sign in to comment.