misc: Minor improvements (#1898)

* misc: Minor improvements

* Update functions.php

* Update functions.php
This commit is contained in:
Roman Kelesidis 2025-05-05 19:11:22 +03:00 committed by GitHub
commit 2f026921ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -2218,9 +2218,16 @@ 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 = [
'response' => false,
'timestamp' => TIMENOW
];
}
CACHE('bb_ip2countries')->set($cacheName, $data, 1200);
}
return $data;