From 340d9d060038bb44e4c6974aa5c6fcf77dcdd4fa Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 3 Feb 2017 18:52:35 +0100 Subject: [PATCH] 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. --- framework/core/src/Core/Command/RegisterUserHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Core/Command/RegisterUserHandler.php b/framework/core/src/Core/Command/RegisterUserHandler.php index e477902fa..9d7a120c1 100644 --- a/framework/core/src/Core/Command/RegisterUserHandler.php +++ b/framework/core/src/Core/Command/RegisterUserHandler.php @@ -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; } }