Skip to content

Commit

Permalink
[Validator] Added a note why scalars are passed to cascadeObject() in…
Browse files Browse the repository at this point in the history
… NodeTraverser
  • Loading branch information
webmozart committed Mar 30, 2014
1 parent 9b07b0c commit 297ba4f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ private function traverseNode(Node $node)
$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,
Expand Down

0 comments on commit 297ba4f

Please sign in to comment.