| @@ -89,9 +89,11 @@ | ||
| 89 | 89 | * @return true|WP_Error |
| 90 | 90 | */ |
| 91 | 91 | protected function verifyAuthorization(?string $authHeader) |
| 92 | 92 | { |
| 93 | - if ($apikey = (new Logtivity_Options())->getApiKey()) { | |
| 93 | + $apikey = (new Logtivity_Options())->getApiKey(); | |
| 94 | + | |
| 95 | + if ($apikey) { | |
| 94 | 96 | try { |
| 95 | 97 | if ($authHeader == false) { |
| 96 | 98 | throw new Exception('No authorization provided'); |
| 97 | 99 | } |