diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php index bb978e7e948..0972da056b3 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Command/SetNodeProperties.php @@ -48,6 +48,9 @@ private function __construct( public OriginDimensionSpacePoint $originDimensionSpacePoint, public PropertyValuesToWrite $propertyValues, ) { + if ($this->propertyValues->isEmpty()) { + throw new \InvalidArgumentException(sprintf('The command "SetNodeProperties" for node %s must contain property values', $this->nodeAggregateId->value), 1733394351); + } } /** diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Dto/PropertyValuesToWrite.php b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Dto/PropertyValuesToWrite.php index dcc0f414f3c..b27d956d5f5 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Dto/PropertyValuesToWrite.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeModification/Dto/PropertyValuesToWrite.php @@ -95,4 +95,9 @@ public function getPropertiesToUnset(): PropertyNames ) ); } + + public function isEmpty(): bool + { + return $this->values === []; + } }