diff --git a/inc/functions.php b/inc/functions.php index eecf7eb1..45f81702 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -356,8 +356,12 @@ function define_groups() { function create_antibot($board, $thread = null) { require_once dirname(__FILE__) . '/anti-bot.php'; + global $pdo; - return _create_antibot($board, $thread); + // Ensure $pdo is initialized. + sql_open(); + + return _create_antibot($pdo, $board, $thread); } function rebuildThemes($action, $boardname = false) {