[ticket/16735] Fix access array offset on value of type bool on login

PHPBB3-16735
This commit is contained in:
3D-I 2021-03-23 02:01:45 +01:00
parent 6d46c08191
commit e0b4f3ff37

View file

@ -153,8 +153,10 @@ class db extends base
}
$login_error_attempts = 'LOGIN_ERROR_ATTEMPTS';
$show_captcha = ($this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']) ||
($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
$show_captcha = ($row) ? ($this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']) ||
($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']) : false;
if ($show_captcha)
{
$captcha = $this->captcha_factory->get_instance($this->config['captcha_plugin']);