mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00: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)
|
public function ProductStockEntries(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
$allowSubproductSubstitution = false;
|
$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;
|
$allowSubproductSubstitution = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user