We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5254e03 commit 607f446Copy full SHA for 607f446
Model/Validator.php
@@ -82,17 +82,15 @@ private function query($prefix): array
82
return $this->serializer->unserialize($cacheEntry);
83
}
84
85
- $hashes = [];
86
-
87
$this->httpClient->get(self::PWNED_BASE_URL . '/range/' . $prefix);
88
89
if ($this->httpClient->getStatus() !== 200) {
90
- return $hashes;
+ return [];
91
92
93
$body = $this->httpClient->getBody();
94
$results = explode("\n", $body);
95
+ $hashes = [];
96
foreach ($results as $value) {
97
list($hash, $count) = explode(':', $value);
98
$hashes[$hash] = (int)$count;
0 commit comments