Fix warning

This commit is contained in:
eraseyourknees 2022-10-22 02:35:44 +02:00
parent aea298d55d
commit 5ac6eb4ad3

View File

@ -10,7 +10,8 @@ $noLinks = isset($_GET['noLinks']) ? $_GET['noLinks'] : 0;
header('Content-Type: application/json');
$resource = hash('sha1', strtolower("get-$updateId-$usePack-$desiredEdition"));
$edition = is_array($desiredEdition) ? implode('_', $desiredEdition) : $desiredEdition;
$resource = hash('sha1', strtolower("get-$updateId-$usePack-$edition"));
if(checkIfUserIsRateLimited($resource) && !$noLinks) {
http_response_code(429);
sendResponse(['error' => 'USER_RATE_LIMITED']);