From cc4d136937f3aba23d05dd56a1f2e13f452cb919 Mon Sep 17 00:00:00 2001 From: Yann Cochard Date: Thu, 9 Oct 2025 21:05:21 +0200 Subject: [PATCH 1/2] Correct "Notice: Only variables should be passed by reference" --- auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auth.php b/auth.php index aab3985..3ae16d9 100644 --- a/auth.php +++ b/auth.php @@ -588,7 +588,8 @@ private function use_phpbb_cache() { */ private function phpbb_connect() { if (!$this->_phpbb_db_link) { - $host = strtolower(end(explode('\\', $this->_phpbb_conf['dbms']))); + $exploded = explode('\\', $this->_phpbb_conf['dbms']); + $host = strtolower(end($exploded)); $port = ''; $dsn = ''; From 42868be13931f7da7692e54f17648404c18c60a1 Mon Sep 17 00:00:00 2001 From: Yann Cochard Date: Fri, 10 Oct 2025 13:54:26 +0200 Subject: [PATCH 2/2] Logs "user not found" if SELECT query returns empty. --- auth.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/auth.php b/auth.php index 3ae16d9..4035e58 100644 --- a/auth.php +++ b/auth.php @@ -277,6 +277,11 @@ public function getUserData($user, $requireGroups = true) { return false; } $row = $result->fetch(PDO::FETCH_ASSOC); + if ($row === false) { + $this->dbglog('user not found: ' . $user); + $result->closeCursor(); + return false; + } $this->_phpbb_user_type = (int)$row['user_type']; $this->_phpbb_user_id = (int)$row['user_id']; $this->_phpbb_username = $row['username'];