Skip to content

Commit

Permalink
Fixed PHP Warning: Undefined array key 'access_token'
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Sep 12, 2024
1 parent b5c8851 commit 52dde49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/Data/TotpRefreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function run(AbstractSocket $socket, array $argv, int $id)
{
$params = json_decode(stripslashes($argv[1]), true);

if ($params['access_token']) {
if (isset($params['access_token'])) {
$decoded = JWT::decode($params['access_token'], new Key($_ENV['JWT_SECRET'], 'HS256'));
$sql = "SELECT * FROM users WHERE username = :username";
$values[] = [
Expand Down

0 comments on commit 52dde49

Please sign in to comment.