diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index a713c22..508bfd9 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -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 diff --git a/src/Listener/SaveReactionsToDatabase.php b/src/Listener/SaveReactionsToDatabase.php index 9cde916..7bf09ff 100755 --- a/src/Listener/SaveReactionsToDatabase.php +++ b/src/Listener/SaveReactionsToDatabase.php @@ -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; } }