Skip to content

Commit

Permalink
Return just propertyName in the exception
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reschke  <lukas@statuscode.ch>
  • Loading branch information
LukasReschke committed Apr 7, 2021
1 parent 2ba7ab0 commit ed8ccad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Accounts/AccountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function updateUser(IUser $user, array $data, bool $throwOnData = false):
foreach ($data as $propertyName => $propertyData) {
if (isset($data[$propertyName]) && isset($data[$propertyName]['value']) && strlen($data[$propertyName]['value']) > 2048) {
if ($throwOnData) {
throw new \InvalidArgumentException($propertyName . ' is too long');
throw new \InvalidArgumentException($propertyName);
} else {
$data[$propertyName]['value'] = '';
}
Expand Down

0 comments on commit ed8ccad

Please sign in to comment.