Skip to content

Commit 82986f5

Browse files
committed
prevent 'undefined index' warning
1 parent f59e5fa commit 82986f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/PowerIdPDisco.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,14 @@ public function handleRequest(): void
296296
}
297297
}
298298

299-
if (!is_null($t->data['faventry'])) {
299+
if (isset($t->data['faventry'])) {
300300
$t->data['autofocus'] = 'favouritesubmit';
301301
}
302302

303303
/* store the tab list in the session */
304304
$session = Session::getSessionFromRequest();
305-
$session->setData('discopower:tabList', 'faventry', $t->data['faventry']);
305+
if (array_key_exists('faventry', $t->data))
306+
$session->setData('discopower:tabList', 'faventry', $t->data['faventry']);
306307
$session->setData('discopower:tabList', 'tabs', array_keys($idpList));
307308
$session->setData('discopower:tabList', 'defaulttab', $t->data['defaulttab']);
308309

0 commit comments

Comments
 (0)