mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
fix error with getInt() and inject PaginatorFactory service in EventController
This commit is contained in:
@@ -369,7 +369,8 @@ class ParticipationController extends Controller
|
||||
. "the object manager using the method ".__METHOD__);
|
||||
}
|
||||
|
||||
$event_id = $request->query->getInt('event_id', null);
|
||||
$event_id = $request->query->getInt('event_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
if ($event_id !== NULL) {
|
||||
$event = $em->getRepository('ChillEventBundle:Event')
|
||||
@@ -388,9 +389,9 @@ class ParticipationController extends Controller
|
||||
// this script should be able to handle multiple, so we translate
|
||||
// single person_id in an array
|
||||
$persons_ids = $request->query->has('person_id') ?
|
||||
array($request->query->getInt('person_id', null)):
|
||||
explode(',', $request->query->get('persons_ids'))
|
||||
;
|
||||
[$request->query->getInt('person_id', 0)] // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
: explode(',', $request->query->get('persons_ids'));
|
||||
$participations = array();
|
||||
|
||||
foreach($persons_ids as $person_id) {
|
||||
|
Reference in New Issue
Block a user