[Validator] Added a note why scalars are passed to cascadeObject() in NodeTraverser

This commit is contained in:
Bernhard Schussek 2014-02-18 18:07:44 +01:00
parent 9b07b0c672
commit 297ba4f585
1 changed files with 3 additions and 0 deletions

View File

@ -113,6 +113,9 @@ class NodeTraverser implements NodeTraverserInterface
$traversalStrategy
);
} elseif ($cascadingStrategy & CascadingStrategy::CASCADE) {
// If the value is a scalar, pass it anyway, because we want
// a NoSuchMetadataException to be thrown in that case
// (BC with Symfony < 2.5)
$this->cascadeObject(
$node->value,
$node->propertyPath,