Skip to content

Conversation

eduardosoliv
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

This bug was introduced on PR-790 [2.3] [Validator] added comparison constraints and validators

Due to the change on root (to become the value):

-        $context = new ExecutionContext($this->createVisitor(null), $this->translator, $this->translationDomain);
+        $context = new ExecutionContext($this->createVisitor($value), $this->translator, $this->translationDomain);

https://github.com/symfony/symfony/pull/790/files#diff-f4a93c3d8fcb85a24ea41c2a993e6d83R163

My change on:

-        $class = (string) (is_object($this->root) ? get_class($this->root) : $this->root);
+        $class = is_object($this->root)
+            ? get_class($this->root)
+            : (is_array($this->root) ? 'Array' : (string) $this->root);
+

Is inspired on TypeValidator

@webmozart
Copy link
Contributor

Fixed by #10123.

@webmozart webmozart closed this Apr 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants