Commit 61d760e7 authored by Francois Suter's avatar Francois Suter Committed by Benni Mack
Browse files

[BUGFIX] Undefined array keys related to workspaces

Fixes some undefined array key errors which happen in some specific
scenarios related to workspaces usage.

Resolves: #95564
Releases: master
Change-Id: I22fde56a506ae327ed0121bc68882996da7728df
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71532


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 6eed2f6b
......@@ -949,7 +949,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
// Check if the user is responsible for the current stage
if (
$accessType === 'member'
&& GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_users_' . $this->user['uid'])
&& GeneralUtility::inList($workspaceStageRec['responsible_persons'] ?? '', 'be_users_' . $this->user['uid'])
) {
return true;
}
......@@ -957,7 +957,7 @@ class BackendUserAuthentication extends AbstractUserAuthentication
foreach ($this->userGroupsUID as $groupUid) {
if (
$accessType === 'member'
&& GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_groups_' . $groupUid)
&& GeneralUtility::inList($workspaceStageRec['responsible_persons'] ?? '', 'be_groups_' . $groupUid)
) {
return true;
}
......
......@@ -223,7 +223,7 @@ class WorkspaceRecord extends AbstractRecord
$fieldNamePrefix = $this->internalStages[$stageId]['name'] . '_';
foreach ($this->internalStageFieldNames as $fieldName) {
$record[$fieldName] = $this->record[$fieldNamePrefix . $fieldName];
$record[$fieldName] = $this->record[$fieldNamePrefix . $fieldName] ?? null;
}
$stage = StageRecord::build($this, $stageId, $record);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment