From: Michael Date: Thu, 1 Dec 2022 06:12:13 +0000 (+0000) Subject: Avoid 'Undefined array key "last-activity"' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=146f874c2e2935ae82c563f71d174dadac5d20ce;p=friendica.git Avoid 'Undefined array key "last-activity"' --- diff --git a/src/Model/User.php b/src/Model/User.php index eb8d22c58c..40384b619b 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -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) {