Skip to content

Commit

Permalink
php 7.x compat
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 21, 2023
1 parent 016ea9d commit 1874d82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@2.x
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true

Expand Down
3 changes: 2 additions & 1 deletion src/Listener/SaveReactionsToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ protected function isExtensionEnabled(string $extension): bool

protected function getSessionId(): ?string
{
return $this->request->getAttribute('session')?->getId();
$session = $this->request->getAttribute('session');
return $session ? $session->getId() : null;
}
}

0 comments on commit 1874d82

Please sign in to comment.