Properly filter product-group query parameter

This commit is contained in:
Bernd Bestel 2026-04-16 23:30:20 +02:00
parent 503ee5d5d7
commit 4581b8cd66
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -37,7 +37,7 @@ class StockReportsController extends BaseController
{
$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'];
}