diff options
Diffstat (limited to 'lib/private/Accounts')
-rw-r--r-- | lib/private/Accounts/Account.php | 2 | ||||
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php index 5f063d5dc5f..8fe2255e030 100644 --- a/lib/private/Accounts/Account.php +++ b/lib/private/Accounts/Account.php @@ -59,7 +59,7 @@ class Account implements IAccount { if ($this->isCollection($property)) { throw new \InvalidArgumentException('getProperty cannot retrieve an IAccountsPropertyCollection'); } - if (!array_key_exists($property, $this->properties)) { + if (!array_key_exists($property, $this->properties) || !$this->properties[$property] instanceof IAccountProperty) { throw new PropertyDoesNotExistException($property); } return $this->properties[$property]; diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 801250004fb..4d7aae644bb 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -142,7 +142,7 @@ class AccountManager implements IAccountManager { } protected function sanitizeLength(array &$propertyData, bool $throwOnData = false): void { - if (isset($propertyData) && isset($propertyData['value']) && strlen($propertyData['value']) > 2048) { + if (isset($propertyData['value']) && strlen($propertyData['value']) > 2048) { if ($throwOnData) { throw new \InvalidArgumentException(); } else { |