Skip to content

Commit

Permalink
Merge pull request #30 from Flowpack/bugfix-no-account-found-in-secur…
Browse files Browse the repository at this point in the history
…ity-context-causes-crash

BUGFIX: Prevent crash when SecurityContext has no Account
  • Loading branch information
JamesAlias authored Jul 3, 2023
2 parents f20b7b6 + 92fe6eb commit f75bdb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ContentReleaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private function resolveCurrentContentReleaseId(?string $currentContentReleaseId

private function getAccountId(): ?string
{
if ($this->securityContext->isInitialized()) {
if ($this->securityContext->isInitialized() && !is_null($this->securityContext->getAccount())) {
return $this->securityContext->getAccount()->getAccountIdentifier();
}

Expand Down

0 comments on commit f75bdb8

Please sign in to comment.