|
8 | 8 | * License: GNU/GPLv2
|
9 | 9 | * @see LICENSE.txt
|
10 | 10 | *
|
11 |
| - * This file: The scanner (last modified: 2024.03.21). |
| 11 | + * This file: The scanner (last modified: 2024.09.02). |
12 | 12 | */
|
13 | 13 |
|
14 | 14 | namespace phpMussel\Core;
|
@@ -3632,37 +3632,30 @@ private function safeBrowseLookup(array $URLs, array $URLsNoLookup = [], array $
|
3632 | 3632 | * @link https://developers.google.com/safe-browsing/v4/status-codes
|
3633 | 3633 | */
|
3634 | 3634 | if (isset($this->Loader->MostRecentHttpCode) && $this->Loader->MostRecentHttpCode !== 200) {
|
3635 |
| - /** |
3636 |
| - * Malformed request detected (e.g., invalid argument, invalid |
3637 |
| - * request payload, etc). |
3638 |
| - */ |
3639 | 3635 | if ($this->Loader->MostRecentHttpCode === '400') {
|
| 3636 | + /** |
| 3637 | + * Malformed request detected (e.g., invalid argument, invalid request payload, |
| 3638 | + * etc). |
| 3639 | + */ |
3640 | 3640 | $returnVal = 400;
|
3641 |
| - } |
3642 |
| - |
3643 |
| - /** |
3644 |
| - * Unauthorised (most likely an invalid API key used). Returning |
3645 |
| - * the same message for 401 and 403 because the returned message is |
3646 |
| - * suitable either way. |
3647 |
| - */ |
3648 |
| - elseif ($this->Loader->MostRecentHttpCode >= '401' && $this->Loader->MostRecentHttpCode <= 403) { |
| 3641 | + } elseif ($this->Loader->MostRecentHttpCode >= '401' && $this->Loader->MostRecentHttpCode <= 403) { |
| 3642 | + /** |
| 3643 | + * Unauthorised (most likely an invalid API key used). Returning the same |
| 3644 | + * message for 401 and 403 because the returned message is suitable either way. |
| 3645 | + */ |
3649 | 3646 | $returnVal = 401;
|
3650 |
| - } |
3651 |
| - |
3652 |
| - /** |
3653 |
| - * Service unavailable or internal server error. Returning the same |
3654 |
| - * message for 429, 500, 503, 504 alike because, for our purpose, |
3655 |
| - * the returned message is suitable in any case. |
3656 |
| - */ |
3657 |
| - elseif ($this->Loader->MostRecentHttpCode >= '429') { |
| 3647 | + } elseif ($this->Loader->MostRecentHttpCode >= '429') { |
| 3648 | + /** |
| 3649 | + * Service unavailable or internal server error. Returning the same message for |
| 3650 | + * 429, 500, 503, 504 alike because, for our purpose, the returned message is |
| 3651 | + * suitable in any case. |
| 3652 | + */ |
3658 | 3653 | $returnVal = 503;
|
3659 |
| - } |
3660 |
| - |
3661 |
| - /** |
3662 |
| - * Fallback for other error codes (in theory, this shouldn't ever |
3663 |
| - * be reached, but adding it here just in case). |
3664 |
| - */ |
3665 |
| - else { |
| 3654 | + } else { |
| 3655 | + /** |
| 3656 | + * Fallback for other error codes (in theory, this shouldn't ever be reached, but |
| 3657 | + * adding it here just in case). |
| 3658 | + */ |
3666 | 3659 | $returnVal = 999;
|
3667 | 3660 | }
|
3668 | 3661 |
|
|
0 commit comments