Hello.
I am developing a new login method with ButtonHandler class. When linking an account from the UCP, I get this error:
Whoops\Exception\ErrorException thrown with message "Undefined array key "details""
Stacktrace:
#4 Whoops\Exception\ErrorException in /usr/localhost/applications/core/modules/front/system/login.php:261
#3 Whoops\Run:handleError in /usr/localhost/applications/core/modules/front/system/login.php:262
#2 IPS\core\modules\front\system\login:link in /usr/localhost/system/Dispatcher/Controller.php:128
#1 IPS\Dispatcher\Controller:execute in /usr/localhost/system/Dispatcher/Dispatcher.php:169
#0 IPS\Dispatcher:run in /usr/localhost/index.php:16
Problem code:
$handler->completeLink( $member, $details['details'] );
Which can be solved by adding such a before:
$details['details'] = '';
I looked at where the $details array is formed from and here it is:
$_SESSION['linkAccounts'] = json_encode( [ 'member' => $e->member->member_id, 'handler' => $e->handler->id ] );
There is no key 'details' here. Looks like it's a bug!
Recommended Comments