mirror of
https://github.com/grocy/grocy.git
synced 2026-06-02 17:14:00 +00:00
Optimized filter_var checks
This commit is contained in:
@@ -51,7 +51,7 @@ class SystemApiController extends BaseApiController
|
||||
$params = $request->getQueryParams();
|
||||
if (isset($params['offset']))
|
||||
{
|
||||
if (!filter_var($params['offset'], FILTER_VALIDATE_INT))
|
||||
if (filter_var($params['offset'], FILTER_VALIDATE_INT) === false)
|
||||
{
|
||||
throw new \Exception('Query parameter "offset" is not a valid integer');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user