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:
Franz Liedke 2017-02-03 18:52:35 +01:00
parent d5ccc7392a
commit 340d9d0600

View File

@ -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;
}
}