Avoid use of assignments bare inside statements

Either use them in a subroutine call or put parentheses around the assignment.
This commit is contained in:
Alexei Sorokin
2020-09-08 12:42:51 +03:00
parent d0f96a7023
commit adc689cb15
15 changed files with 934 additions and 791 deletions

View File

@@ -770,7 +770,7 @@ class User extends Managed_DataObject
throw new ServerException(_('Single-user mode code called when not enabled.'));
}
if ($nickname = common_config('singleuser', 'nickname')) {
if (!empty($nickname = common_config('singleuser', 'nickname'))) {
$user = User::getKV('nickname', $nickname);
if ($user instanceof User) {
return $user;