mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
Fix for #1223
This commit is contained in:
parent
6263715c53
commit
8401bd3dc7
|
|
@ -51,7 +51,8 @@ class SystemApiController extends BaseApiController
|
|||
$params = $request->getQueryParams();
|
||||
if (isset($params['offset']))
|
||||
{
|
||||
if (!filter_var($params['offset'], FILTER_VALIDATE_INT))
|
||||
//Checks if int. Without the === 0 this would return false if 0 was passed as an argument
|
||||
if (!(filter_var($params['offset'], FILTER_VALIDATE_INT) === 0 || filter_var($params['offset'], FILTER_VALIDATE_INT)))
|
||||
{
|
||||
throw new \Exception('Query parameter "offset" is not a valid integer');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user