mirror of
https://github.com/flarum/framework.git
synced 2025-01-22 23:40:45 +08:00
Clarify condition
I want to make it a little more clear that we are checking exactly for these two values. That may also help preventing further confusion as to why we are not using empty() here. Amendment to PR #1033.
This commit is contained in:
parent
d5ccc7392a
commit
340d9d0600
|
@ -116,7 +116,7 @@ class RegisterUserHandler
|
|||
// from the get-go.
|
||||
if (isset($token)) {
|
||||
foreach ($token->payload as $k => $v) {
|
||||
if ($user->$k === '' || ! isset($user->$k)) {
|
||||
if (in_array($user->$k, ['', null], true)) {
|
||||
$user->$k = $v;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user