Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-01-20 12:09:45 +0300
committerJoas Schilling <coding@schilljs.com>2021-01-20 12:09:45 +0300
commit1e35ece8e59ed31c0ae7a578aced99d257e97e67 (patch)
tree9808d6e4629196996ea0b1f9576b9e1f63d4c8db /apps
parent6c1e294edd7389c8ecffdd2ead2534bf9972c64f (diff)
Fix potential empty result
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Listener/StorePasswordListener.php4
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) {