mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
Properly check for any boolean value query parameter
This commit is contained in:
parent
5d83ec7967
commit
0e41500a63
|
|
@ -568,7 +568,7 @@ class StockApiController extends BaseApiController
|
|||
public function ProductStockEntries(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
$allowSubproductSubstitution = false;
|
||||
if (isset($request->getQueryParams()['include_sub_products']) && boolval($request->getQueryParams()['include_sub_products']))
|
||||
if (isset($request->getQueryParams()['include_sub_products']) && filter_var($request->getQueryParams()['include_sub_products'], FILTER_VALIDATE_BOOLEAN))
|
||||
{
|
||||
$allowSubproductSubstitution = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user