[BUGFIX] Check WorkspaceEnabled for MM field related table
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Database / RelationHandler.php
index f2b0182..de85f5c 100644 (file)
@@ -1166,9 +1166,10 @@ class RelationHandler {
                }
 
                foreach ($this->tableArray as $itemTableName => $itemIds) {
-                       if (!count($itemIds)) {
+                       if (!count($itemIds) || !BackendUtility::isTableWorkspaceEnabled($itemTableName)) {
                                continue;
                        }
+
                        $purgedItemIds = call_user_func(array($this, $purgeCallback), $itemTableName, $itemIds);
                        $removedItemIds = array_diff($itemIds, $purgedItemIds);
                        foreach ($removedItemIds as $removedItemId) {