mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
replace BadRequestException by BadRequestHttpException
This commit is contained in:
@@ -21,8 +21,8 @@ use Chill\PersonBundle\Security\Authorization\HouseholdVoter;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
@@ -202,7 +202,7 @@ class HouseholdController extends AbstractController
|
||||
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
|
||||
|
||||
if (!$request->query->has('address_id')) {
|
||||
throw new BadRequestException('parameter address_id is missing');
|
||||
throw new BadRequestHttpException('parameter address_id is missing');
|
||||
}
|
||||
|
||||
$address_id = $request->query->getInt('address_id');
|
||||
@@ -218,7 +218,7 @@ class HouseholdController extends AbstractController
|
||||
}
|
||||
|
||||
if (null === $address) {
|
||||
throw new BadRequestException('The edited address does not belongs to the household');
|
||||
throw new BadRequestHttpException('The edited address does not belongs to the household');
|
||||
}
|
||||
|
||||
$form = $this->createForm(AddressDateType::class, $address, []);
|
||||
|
Reference in New Issue
Block a user