diff options
author | Joas Schilling <coding@schilljs.com> | 2021-01-20 10:09:45 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-01-20 10:09:45 +0100 |
commit | 1e35ece8e59ed31c0ae7a578aced99d257e97e67 (patch) | |
tree | 9808d6e4629196996ea0b1f9576b9e1f63d4c8db /apps/files_external/lib | |
parent | 6c1e294edd7389c8ecffdd2ead2534bf9972c64f (diff) | |
download | nextcloud-server-1e35ece8e59ed31c0ae7a578aced99d257e97e67.tar.gz nextcloud-server-1e35ece8e59ed31c0ae7a578aced99d257e97e67.zip |
Fix potential empty result
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/Listener/StorePasswordListener.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/Listener/StorePasswordListener.php b/apps/files_external/lib/Listener/StorePasswordListener.php index a2c359e58db..27de4ada465 100644 --- a/apps/files_external/lib/Listener/StorePasswordListener.php +++ b/apps/files_external/lib/Listener/StorePasswordListener.php @@ -51,9 +51,9 @@ class StorePasswordListener implements IEventListener { } $stored = $this->credentialsManager->retrieve($event->getUser()->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER); - $update = $stored['password'] !== $event->getPassword(); + $update = isset($stored['password']) && $stored['password'] !== $event->getPassword(); if (!$update && $event instanceof UserLoggedInEvent) { - $update = $stored['user'] !== $event->getLoginName(); + $update = isset($stored['user']) && $stored['user'] !== $event->getLoginName(); } if ($stored && $update) { |