Skip to content

Commit 3e2dce5

Browse files
authored
Admin Fixes (#87)
* 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
1 parent 7611f2b commit 3e2dce5

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/routes.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
}
4646

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

5053
$app->get('/callback/{callback}', 'PHPMinds\Action\CallbackAction:dispatch')
5154
->setName('callbacks');

app/src/Service/EventsService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getPastEvents()
8484
public function getEventById($eventID = null)
8585
{
8686
$event = $this->meetupService->getEventById($eventID);
87-
$eventInfo = $this->eventManager->getDetailsByMeetupID($event['id']);
87+
$eventInfo = $this->eventManager->getDetailsByMeetupID($event['id'] ?? null);
8888
$eventInfo = $eventInfo[0] ?? null;
8989

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

299299
/**

0 commit comments

Comments
 (0)