Skip to content

Fix Undefined Array Key Warning in Callback->handleCallback() #23

@UnnikrishnanBhargavakurup

Description

The Callback->handleCallback() method in the HelloCoop library triggers a PHP warning due to an undefined array key:

Undefined array key "accessDenied" in HelloCoop\Handler\Callback->handleCallback() (line 205 src/Handler/Callback.php)

Problem

The warning occurs because the code assumes the $callback array contains the key accessDenied without verifying its existence:

if ($callback['accessDenied']) {
    return $this->sendErrorPage([
        'error' => 'access_denied',
        'error_description' => 'loginSync denied access',
        'target_uri' => $targetUri,
    ], 'Access denied by loginSync.');
}

Task

Ensure the existence of the $callback['accessDenied'] key before using it to prevent warnings and potential issues.

References

  • File: src/Handler/Callback.php
  • Line: 205

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions