diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-03 21:55:57 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-04 19:57:00 +0200 |
commit | 35d5395089e17e2402e4786c25f0ba915b924773 (patch) | |
tree | 5b3345ca6e725955cab09fbd61095e4fbb6b86ab /lib/private | |
parent | 8ec640d14ac6dec7c6f52ac8bca997615931478b (diff) | |
download | nextcloud-server-35d5395089e17e2402e4786c25f0ba915b924773.tar.gz nextcloud-server-35d5395089e17e2402e4786c25f0ba915b924773.zip |
psalm happiness
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
psalm happiness
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private')
-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 { |