diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-11-27 19:09:55 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-12-17 15:11:25 +0300 |
commit | a76695962b02aee8db5c81dda6c87ea874268811 (patch) | |
tree | 692ae9bab89e059ba03f994b93044f423601be2b /apps/dav | |
parent | aff41210ad42ade669c110b6a683eafd66764e8d (diff) |
be careful with mixed return values even if it may look unsuspicious…
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CardDAV/SyncService.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/HookManager.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 5bd92015ad7..6f6fa0ba379 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -261,7 +261,7 @@ class SyncService { /** * @param IUser $user */ - public function updateUser($user) { + public function updateUser(IUser $user) { $systemAddressBook = $this->getLocalSystemAddressBook(); $addressBookId = $systemAddressBook['id']; $converter = new Converter($this->accountManager); diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php index b1bd039c65e..27b6525be47 100644 --- a/apps/dav/lib/HookManager.php +++ b/apps/dav/lib/HookManager.php @@ -101,7 +101,9 @@ class HookManager { public function postCreateUser($params) { $user = $this->userManager->get($params['uid']); - $this->syncService->updateUser($user); + if ($user instanceof IUser) { + $this->syncService->updateUser($user); + } } public function preDeleteUser($params) { |