Skip to content

Commit

Permalink
Fix undefined array key "_transferSize"
Browse files Browse the repository at this point in the history
  • Loading branch information
A5hleyRich committed Apr 24, 2024
1 parent d2badb2 commit a7f0bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public function time(int $precision = 2): float

public function size(): int
{
return $this->request['response']['_transferSize'];
return $this->request['response']['_transferSize'] ?? 0;
}

public function uncompressedSize(): int
{
return $this->request['response']['content']['size'];
return $this->request['response']['content']['size'] ?? 0;
}

public function timings(int $precision = 2): array
Expand Down

0 comments on commit a7f0bd3

Please sign in to comment.