Skip to content

Commit 3b7b9f3

Browse files
authored
Merge pull request #27 from Flowpack/bugfix-full-release
BUGFIX: Fix access to uninitialized security context during full publish
2 parents de4e90e + a248f91 commit 3b7b9f3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Classes/ContentReleaseManager.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public function startIncrementalContentRelease(string $currentContentReleaseId =
6868
'currentContentReleaseId' => $currentContentReleaseId ?: self::NO_PREVIOUS_RELEASE,
6969
'validate' => true,
7070
'workspaceName' => $workspace ? $workspace->getName() : 'live',
71-
'accountId' => $this->securityContext->getAccount()->getAccountIdentifier(),
71+
'accountId' => $this->securityContext->isInitialized()
72+
? $this->securityContext->getAccount()->getAccountIdentifier() :
73+
null,
7274
]));
7375
return $contentReleaseId;
7476
}
@@ -88,7 +90,9 @@ public function startFullContentRelease(bool $validate = true, string $currentCo
8890
'currentContentReleaseId' => $currentContentReleaseId ?: self::NO_PREVIOUS_RELEASE,
8991
'validate' => $validate,
9092
'workspaceName' => $workspace ? $workspace->getName() : 'live',
91-
'accountId' => $this->securityContext->getAccount()->getAccountIdentifier(),
93+
'accountId' => $this->securityContext->isInitialized()
94+
? $this->securityContext->getAccount()->getAccountIdentifier() :
95+
null,
9296
]));
9397
return $contentReleaseId;
9498
}

0 commit comments

Comments
 (0)