Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / validator / Constraints / ExpressionValidator.php
index e2f3139af73b85652904c5ea7bb53d85c26e38c2..ce77d9ba843a42400419bb44c27d3ba4544e30f9 100644 (file)
@@ -23,9 +23,6 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
  */
 class ExpressionValidator extends ConstraintValidator
 {
-    /**
-     * @var ExpressionLanguage
-     */
     private $expressionLanguage;
 
     public function __construct($propertyAccessor = null, ExpressionLanguage $expressionLanguage = null)
@@ -48,7 +45,7 @@ class ExpressionValidator extends ConstraintValidator
 
         if (!$this->getExpressionLanguage()->evaluate($constraint->expression, $variables)) {
             $this->context->buildViolation($constraint->message)
-                ->setParameter('{{ value }}', $this->formatValue($value))
+                ->setParameter('{{ value }}', $this->formatValue($value, self::OBJECT_TO_STRING))
                 ->setCode(Expression::EXPRESSION_FAILED_ERROR)
                 ->addViolation();
         }