mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 13:33:48 +00:00
sf4, adding workflow and fix errors for task bundle
This commit is contained in:
@@ -75,7 +75,9 @@ class SingleTaskController extends Controller
|
||||
;
|
||||
|
||||
if ($request->query->has('person_id')) {
|
||||
$personId = $request->query->getInt('person_id', null);
|
||||
|
||||
$personId = $request->query->getInt('person_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
if ($personId === null) {
|
||||
return new Response("You must provide a person_id", Response::HTTP_BAD_REQUEST);
|
||||
@@ -454,7 +456,9 @@ class SingleTaskController extends Controller
|
||||
if ($request->query->get('user_id') === '_unassigned') {
|
||||
$params['unassigned'] = true;
|
||||
} else {
|
||||
$userId = $request->query->getInt('user_id', null);
|
||||
$userId = $request->query->getInt('user_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
$user = $this->getDoctrine()->getManager()
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->find($userId);
|
||||
@@ -470,7 +474,9 @@ class SingleTaskController extends Controller
|
||||
|
||||
if (!empty($request->query->get('scope_id'))) {
|
||||
|
||||
$scopeId = $request->query->getInt('scope_id', null);
|
||||
$scopeId = $request->query->getInt('scope_id', 0); // sf4 check:
|
||||
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
|
||||
|
||||
$scope = $this->getDoctrine()->getManager()
|
||||
->getRepository('ChillMainBundle:Scope')
|
||||
->find($scopeId);
|
||||
|
Reference in New Issue
Block a user