From f5b05cc177f5f74dd3b8f8ed4bd3161c18cbb16f Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 5 May 2025 19:07:07 +0300 Subject: [PATCH] Update functions.php --- library/includes/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/includes/functions.php b/library/includes/functions.php index 943648d29..62d878478 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -2218,9 +2218,13 @@ function infoByIP(string $ipAddress, int $port = 0): array 'continent' => $json['continent'], 'continentCode' => $json['continentCode'] ]; - CACHE('bb_ip2countries')->set($cacheName, $data, 1200); } } + + if (empty($data)) { + $data = ['timestamp' => TIMENOW]; + } + CACHE('bb_ip2countries')->set($cacheName, $data, 1200); } return $data;