From 5da5c444a7ed98e267c02c251709852024d7a7e3 Mon Sep 17 00:00:00 2001 From: Michel Loew Date: Wed, 3 Jul 2024 11:44:15 +0200 Subject: [PATCH] FIX: Output propertyValue-type instead of PropertyValueToWrite-type in error-message When a property cannot be matched on NodeCreation, an exception is thrown, but the message is not helpful because it outputs the result of `get_debug_type($propertyValues)` for the complete PropertyValuesToWrite object instead of the actual property. This fixes this behavior. --- .../Classes/Feature/NodeCreation/NodeCreation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php index 3b61818e486..a7de85b451f 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeCreation/NodeCreation.php @@ -113,7 +113,7 @@ private function validateProperties(?PropertyValuesToWrite $propertyValues, Node if (!$propertyType->isMatchedBy($propertyValue)) { throw PropertyCannotBeSet::becauseTheValueDoesNotMatchTheConfiguredType( PropertyName::fromString($propertyName), - get_debug_type($propertyValues), + get_debug_type($propertyValue), $propertyType->value ); }