mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 22:46:13 +00:00
use strict type comparison and replace use of BadRequestException by BadRequestHttpException
This commit is contained in:
parent
fa7850196f
commit
9789c79402
@ -121,7 +121,8 @@ class HouseholdMemberController extends ApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($householdId = $request->query->get('household', false)) {
|
if ($request->query->has('household')) {
|
||||||
|
$householdId = $request->query->get('household', false);
|
||||||
$household = $em->getRepository(Household::class)
|
$household = $em->getRepository(Household::class)
|
||||||
->find($householdId);
|
->find($householdId);
|
||||||
$allowHouseholdCreate = false;
|
$allowHouseholdCreate = false;
|
||||||
@ -189,7 +190,7 @@ class HouseholdMemberController extends ApiController
|
|||||||
['groups' => ['read']]
|
['groups' => ['read']]
|
||||||
);
|
);
|
||||||
} catch (Exception\InvalidArgumentException|Exception\UnexpectedValueException $e) {
|
} catch (Exception\InvalidArgumentException|Exception\UnexpectedValueException $e) {
|
||||||
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
throw new BadRequestHttpException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO ACL
|
// TODO ACL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user