]> source.dussan.org Git - nextcloud-server.git/commitdiff
be careful with mixed return values even if it may look unsuspicious…
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Tue, 27 Nov 2018 16:09:55 +0000 (17:09 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 17 Dec 2018 12:11:25 +0000 (13:11 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/dav/lib/CardDAV/SyncService.php
apps/dav/lib/HookManager.php

index 5bd92015ad70934141408b2c39f59959a86c164a..6f6fa0ba379e313dcf4ae045478cc31dd16a1433 100644 (file)
@@ -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);
index b1bd039c65efbb333f53e7341f3bc19c7db99a79..27b6525be47ed3d94e5759e6267cc816141b2734 100644 (file)
@@ -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) {