Skip to content

Commit 51a2a08

Browse files
authored
Update login.inc.php
If using "cookie_auth" and enter not exists login, then PHP show "Notice: Undefined index: a in /usr/www/pra/includes/login.inc.php on line 112"
1 parent 88e9e0b commit 51a2a08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/login.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function authCookie()
109109

110110
if (isset($_POST['username'], $_POST['password'])) {
111111
// Login form submitted; correctly?
112-
if ($config['login'][$_POST['username']]) {
112+
if (isset($config['login'][$_POST['username']])) {
113113
$userData = $config['login'][$_POST['username']];
114114
if ($_POST['password'] === $userData['password']) {
115115
// Correct username & password. Set cookie and redirect to home page

0 commit comments

Comments
 (0)