Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static function isDraftRecord(string $table, int $uid): bool
$isWorkspaceRecord = false;

if ((ExtensionManagementUtility::isLoaded('workspaces')) && (BackendUtility::isTableWorkspaceEnabled($table))) {
$record = BackendUtility::getRecord($table, $uid, 'pid, t3ver_state');
$record = BackendUtility::getRecord($table, $uid, 'pid, t3ver_state', '', false);

if ($record['pid'] == '-1' || $record['t3ver_state'] > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Officially getRecord() can return either array or null. This patch works, but I would prefer to check for array first, before accessing the array keys.

$isWorkspaceRecord = true;
Expand Down