mirror of
https://github.com/grocy/grocy.git
synced 2026-04-17 01:36:16 +02:00
Properly filter product-group query parameter
This commit is contained in:
parent
503ee5d5d7
commit
4581b8cd66
|
|
@ -37,7 +37,7 @@ class StockReportsController extends BaseController
|
||||||
{
|
{
|
||||||
$where .= ' AND pg.id IS NULL';
|
$where .= ' AND pg.id IS NULL';
|
||||||
}
|
}
|
||||||
elseif ($request->getQueryParams()['product-group'] != 'all')
|
elseif ($request->getQueryParams()['product-group'] != 'all' && filter_var($request->getQueryParams()['product-group'], FILTER_VALIDATE_INT) !== false)
|
||||||
{
|
{
|
||||||
$where .= ' AND pg.id = ' . $request->getQueryParams()['product-group'];
|
$where .= ' AND pg.id = ' . $request->getQueryParams()['product-group'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user