Skip to content

Commit

Permalink
Run $lines through array_filter() to remove empty strings that can ca…
Browse files Browse the repository at this point in the history
…use unhandled exceptions
  • Loading branch information
Jamie Batabyal committed Jul 13, 2022
1 parent 327f93e commit 00f679e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbstractPasswordExposedChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function getPasswordStatus($hash, $responseBody): string
$hash = strtoupper($hash);
$hashSuffix = substr($hash, 5);

$lines = explode("\r\n", $responseBody);
$lines = array_filter(explode("\r\n", $responseBody));

foreach ($lines as $line) {
list($exposedHashSuffix, $occurrences) = explode(':', $line);
Expand Down

0 comments on commit 00f679e

Please sign in to comment.