First phpstan strict check
This commit is contained in:
@@ -1048,7 +1048,7 @@ class Login
|
||||
$res = $this->db->dbReturnRow($q);
|
||||
if (
|
||||
!is_array($res) ||
|
||||
(is_array($res) && empty($res['edit_user_id']))
|
||||
empty($res['edit_user_id'])
|
||||
) {
|
||||
// username wrong
|
||||
$this->login_error = 201;
|
||||
@@ -1068,9 +1068,11 @@ class Login
|
||||
}
|
||||
if (
|
||||
!is_array($res) ||
|
||||
(is_array($res) &&
|
||||
(empty($res['edit_user_id']) ||
|
||||
!$this->loginPasswordCheck($res['old_password_hash'], $this->pw_old_password)))
|
||||
empty($res['edit_user_id']) ||
|
||||
!$this->loginPasswordCheck(
|
||||
$res['old_password_hash'],
|
||||
$this->pw_old_password
|
||||
)
|
||||
) {
|
||||
// old password wrong
|
||||
$this->login_error = 202;
|
||||
@@ -1794,7 +1796,6 @@ EOM;
|
||||
// check that numeric, positive numeric, not longer than max input string lenght
|
||||
// and not short than min password length
|
||||
if (
|
||||
is_numeric($length) &&
|
||||
$length >= $this->password_min_length_max &&
|
||||
$length <= $this->password_max_length &&
|
||||
$length <= 255
|
||||
|
||||
@@ -672,9 +672,6 @@ class Basic
|
||||
public static function arrayToString(array $array, string $connect_char): string
|
||||
{
|
||||
trigger_error('Method ' . __METHOD__ . ' is deprecated, use join()', E_USER_DEPRECATED);
|
||||
if (!is_array($array)) {
|
||||
$array = [];
|
||||
}
|
||||
return join($connect_char, $array);
|
||||
}
|
||||
|
||||
|
||||
@@ -341,6 +341,7 @@ class Session
|
||||
if (isset($_SESSION[$name])) {
|
||||
return $_SESSION[$name];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user