Skip to content

Commit

Permalink
Admin Fixes (#87)
Browse files Browse the repository at this point in the history
* Add CSP middleware (#81)

* Hotfix/csp broken admin (#83)

* Fix notice on array access

* Enable CSP in report-only mode in dashboard

* Add comment for CSP override in routing

* Admin Fixes (#85)

* Add CSP middleware (#81) (#82)

* Add CSP middleware (#81) (#84)

* Hotfix/csp broken admin (#86)

* Fix notice on array access

* Enable CSP in report-only mode in dashboard

* Add comment for CSP override in routing
  • Loading branch information
sdh100shaun authored Jun 22, 2017
1 parent 7611f2b commit 3e2dce5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
}

return $next($request, $response);
});
})->add(
// CSP set to report-only mode within the admin area until all issues are resolved
new Pavlakis\Middleware\Csp\CspMiddleware($container->get('csp.config'))
);

$app->get('/callback/{callback}', 'PHPMinds\Action\CallbackAction:dispatch')
->setName('callbacks');
Expand Down
4 changes: 2 additions & 2 deletions app/src/Service/EventsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getPastEvents()
public function getEventById($eventID = null)
{
$event = $this->meetupService->getEventById($eventID);
$eventInfo = $this->eventManager->getDetailsByMeetupID($event['id']);
$eventInfo = $this->eventManager->getDetailsByMeetupID($event['id'] ?? null);
$eventInfo = $eventInfo[0] ?? null;

return EventFactory::getMergedFromArrays($event, $eventInfo);
Expand Down Expand Up @@ -293,7 +293,7 @@ public function createJoindinTalk($userID, $language = 'English - UK')
*/
public function getEventInfo($meetupID) : array
{
return $this->eventManager->getByMeetupID($meetupID)[0] ?: [];
return $this->eventManager->getByMeetupID($meetupID)[0] ?? [];
}

/**
Expand Down

0 comments on commit 3e2dce5

Please sign in to comment.