diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index fa5e6e4c26..ac65604f35 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -147,7 +147,7 @@ class session while ($row = $db->sql_fetchrow($result)) { - if (preg_match('#' . preg_quote($row['bot_agent'], '#') . '#i', $this->browser)) + if ($row['bot_agent'] && preg_match('#' . preg_quote($row['bot_agent'], '#') . '#i', $this->browser)) { $bot = $row['user_id']; }