From 3655f53232ca24043f2a6da1f7ea774e760e42e7 Mon Sep 17 00:00:00 2001
From: Gabriel Comte <noreply@example.com>
Date: Thu, 27 Jul 2017 10:34:33 +0200
Subject: [PATCH] [BUGFIX] Changed logical operator.

As the Exception says: It is not allowed to have a section without a type
OR a type without a section. So it is not allowed to have one without the
other, but it's allowed to have both or none of them. --> This is a
EXCLUSIVE OR situation.

Releases: master
Resolves: #81985
Change-Id: I00594b75c99b02d1950be106dc4c3389709af231
Reviewed-on: https://review.typo3.org/53610
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jonathan IROULIN <joniroutypo3@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../backend/Classes/Form/FormDataProvider/TcaFlexProcess.php    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
index f448ca58e4de..9baa931a9bd3 100644
--- a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
+++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
@@ -139,7 +139,7 @@ class TcaFlexProcess implements FormDataProviderInterface
                             }
                         }
                     }
-                } elseif (isset($dataStructureFieldDefinition['type']) || isset($dataStructureFieldDefinition['section'])) {
+                } elseif (isset($dataStructureFieldDefinition['type']) xor isset($dataStructureFieldDefinition['section'])) {
                     // type without section is not ok
                     throw new \UnexpectedValueException(
                         'Broken data structure on field name ' . $fieldName . '. section without type or vice versa is not allowed',
-- 
GitLab