]> git.mxchange.org Git - friendica.git/commitdiff
Avoid 'Undefined array key "last-activity"'
authorMichael <heluecht@pirati.ca>
Thu, 1 Dec 2022 06:12:13 +0000 (06:12 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 1 Dec 2022 06:12:13 +0000 (06:12 +0000)
src/Model/User.php

index eb8d22c58cdbda518f9e4a87e792d05aeaca9973..40384b619beb3ec1c7a6c2a0c1fe51c6234630fc 100644 (file)
@@ -674,6 +674,10 @@ class User
        public static function updateLastActivity(int $uid)
        {
                $user = User::getById($uid, ['last-activity']);
+               if (empty($user)) {
+                       return;
+               }
+
                $current_day = DateTimeFormat::utcNow('Y-m-d');
 
                if ($user['last-activity'] != $current_day) {