mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
fix(phpstan): resolve 6 pre-existing type errors + 2 cs-fixer nits
- AdminAuth: drop dead password_hash() === false check (PHP 8 returns string) - ExportController: remove redundant !== null after isset() on duration fields - SystemController: $def['json'] is always present, drop ?? false - TfeController: simplify always-true type guard when sorting TFE files - validate-file-fragment: AV 5GB override condition was always true, apply unconditionally - tests: single-quote string, sort use statements (php-cs-fixer)
This commit is contained in:
1 parent
5228196165
commit
622aac5e58
8 files changed
+13
-12
No files matched your search
@@ -335,10 +335,9 @@ class AdminAuth
|
||||
return false;
|
||||
}
|
||||
|
||||
// password_hash() returns a non-empty string on success and throws
|
||||
// ValueError on failure (PHP 8+), so no false-return check is needed.
|
||||
$hash = password_hash($newPassword, PASSWORD_BCRYPT, ['cost' => 12]);
|
||||
if ($hash === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self::setPasswordHash($hash);
|
||||
self::logout(); // invalidate any existing admin session
|
||||
|
||||
Reference in new issue
Block a user