dont access db result arrays directly without checking whether it's false due to an error (php7.4 related)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -81,7 +81,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
||||
$password_enc = \Froxlor\System\Crypt::makeCryptPassword($password, true);
|
||||
|
||||
// duplicate check
|
||||
if ($username_path_check['username'] == $username && $username_path_check['path'] == $path) {
|
||||
if ($username_path_check && $username_path_check['username'] == $username && $username_path_check['path'] == $path) {
|
||||
\Froxlor\UI\Response::standard_error('userpathcombinationdupe', '', true);
|
||||
} elseif ($password == $username) {
|
||||
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
|
||||
|
||||
Reference in New Issue
Block a user