diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-07-27 14:05:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 14:05:16 +0200 |
commit | 0aed3ecd7669d7f1a20117eef2e6a743b640cdb4 (patch) | |
tree | a145224f0bdbf97568c894284460839d30e0d4bb /lib/private | |
parent | 606b5fe1545ef59e3812e1ac0820a1a5683ad785 (diff) | |
parent | 43a98794676e4fcb77aebd1447a2ab8af759417f (diff) | |
download | nextcloud-server-0aed3ecd7669d7f1a20117eef2e6a743b640cdb4.tar.gz nextcloud-server-0aed3ecd7669d7f1a20117eef2e6a743b640cdb4.zip |
Merge pull request #26724 from nextcloud/backport/25417/stable21
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index eff025e511e..53792c70d27 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -153,6 +153,9 @@ class AccountManager implements IAccountManager { $updated = true; if (isset($data[self::PROPERTY_PHONE]) && $data[self::PROPERTY_PHONE]['value'] !== '') { + // Sanitize null value. + $data[self::PROPERTY_PHONE]['value'] = $data[self::PROPERTY_PHONE]['value'] ?? ''; + try { $data[self::PROPERTY_PHONE]['value'] = $this->parsePhoneNumber($data[self::PROPERTY_PHONE]['value']); } catch (\InvalidArgumentException $e) { |