Keep getting these errors from an old unsupported extension I have installed. I need the extension but hate these errors
Why does this keep happing sometimes but not with all my visitors? Could it be that my database server is slow or blocking me sometimes or is there something wrong with this code here?
Thanks for any help in advance
2024-01-09 17:10:51 - PHP Notice: Undefined index: data in ***/module/botblocker.php on line 149
2024-01-09 17:10:51 - PHP Notice: Undefined index: data in ***/module/botblocker.php on line 162
2024-01-09 17:10:51 - PHP Notice: Undefined index: data in ***/module/botblocker.php on line 166
Here is the PHP code
LINE 149
if ($ipDetails['data']['totalReports'] > 0) {
foreach ($ipDetails['data']['reports'] as $reports) {
foreach ($reports['categories'] as $report) {
$categories[] = $report;
}
}
}
LINE 162
if ($ipDetails['data']['isWhitelisted'] || $ipDetails['data']['abuseConfidenceScore'] == 0 || $ipDetails['data']['totalReports'] == 0) {
$allowed = true;
}
LINE 166
$db->query("INSERT IGNORE INTO " . DB_PREFIX . "bot_blocker_abuseipdb(`ip`, `blocked`, `usage_type`, `domain`, `total_reports`, `ipversion`, `score`) VALUES ('".$ip."', '".($allowed ? 0 : 1)."', '".$ipDetails['data']['usageType']."', '".$ipDetails['data']['domain']."', '".$ipDetails['data']['totalReports']."', '".$ipDetails['data']['ipVersion']."', '".$ipDetails['data']['abuseConfidenceScore']."')");