diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 31a959187e..00b8cca636 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -115,14 +115,14 @@ class ExecutionContext implements ExecutionContextInterface /** * {@inheritdoc} */ - public function addViolationAt($subPath, $message, array $params = array(), $invalidValue = null, $pluralization = null, $code = null) + public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $pluralization = null, $code = null) { $this->globalContext->getViolations()->add(new ConstraintViolation( null === $pluralization - ? $this->translator->trans($message, $params, $this->translationDomain) - : $this->translator->transChoice($message, $pluralization, $params, $this->translationDomain), + ? $this->translator->trans($message, $parameters, $this->translationDomain) + : $this->translator->transChoice($message, $pluralization, $parameters, $this->translationDomain), $message, - $params, + $parameters, $this->globalContext->getRoot(), $this->getPropertyPath($subPath), // check using func_num_args() to allow passing null values diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 0b6c86633d..92f4c5690b 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -104,14 +104,14 @@ interface ExecutionContextInterface * * @param string $subPath The relative property path for the violation. * @param string $message The error message. - * @param array $params The parameters substituted in the error message. + * @param array $parameters The parameters substituted in the error message. * @param mixed $invalidValue The invalid, validated value. * @param integer|null $pluralization The number to use to pluralize of the message. * @param integer|null $code The violation code. * * @api */ - public function addViolationAt($subPath, $message, array $params = array(), $invalidValue = null, $pluralization = null, $code = null); + public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $pluralization = null, $code = null); /** * Validates the given value within the scope of the current validation.