[BUGFIX] Fix editing image in workspaces 13/49713/2
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 1 Sep 2016 09:54:24 +0000 (11:54 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 1 Sep 2016 10:46:04 +0000 (12:46 +0200)
Return value of getWorkspaceVersionOfRecord changed to null.
Adjust the check to catch null as well.

Resolves: #77735
Releases: master
Change-Id: I6e68e377baba2bde08bd10faac1daee855913572
Reviewed-on: https://review.typo3.org/49713
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php

index 0d1f7e2..971bdb9 100644 (file)
@@ -394,7 +394,7 @@ class TcaInline extends AbstractDatabaseRecordProvider implements FormDataProvid
             // @todo: Needs handling
             if ($backendUser->workspace !== 0 && BackendUtility::isTableWorkspaceEnabled($childTableName)) {
                 $workspaceVersion = BackendUtility::getWorkspaceVersionOfRecord($backendUser->workspace, $childTableName, $uid, 'uid,t3ver_state');
-                if ($workspaceVersion !== false) {
+                if (!empty($workspaceVersion)) {
                     $versionState = VersionState::cast($workspaceVersion['t3ver_state']);
                     if ($versionState->equals(VersionState::DELETE_PLACEHOLDER)) {
                         return [];