From a14e8f8ce5c9ea788ae0d6d86b3cece6aa486b52 Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 15 Jun 2023 23:21:34 +0700 Subject: [PATCH] [ticket/16470] Adjust method result type PHPBB3-16470 PHPBB3-14173 --- phpBB/phpbb/session.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 2bc99a86dc..a74a25e122 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1806,7 +1806,7 @@ class session * * @return bool */ - public function update_user_lastvisit() + public function update_user_lastvisit(): bool { global $db; @@ -1818,10 +1818,8 @@ class session $sql = 'UPDATE ' . USERS_TABLE . ' SET user_lastvisit = ' . (int) $this->data['session_time'] . ' WHERE user_id = ' . (int) $this->data['user_id']; + $db->sql_query($sql); - if ($db->sql_query($sql)) - { - return true; - } + return (bool) $db->sql_affectedrows(); } }