Skip to content

Commit

Permalink
merged branch dlsniper/validator-deprecation (PR #6929)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Commits
-------

d0341e8 Replaced call that triggers deprecated error

Discussion
----------

[Validator][ChoiceValidator] Replaced call that triggers deprecated error

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

This removes the deprecation warnings from the ChoiceValidator.
  • Loading branch information
fabpot committed Jan 31, 2013
2 parents 6c00ffe + d0341e8 commit 4b75754
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function validate($value, Constraint $constraint)
}

if ($constraint->callback) {
if (is_callable(array($this->context->getCurrentClass(), $constraint->callback))) {
$choices = call_user_func(array($this->context->getCurrentClass(), $constraint->callback));
if (is_callable(array($this->context->getClassName(), $constraint->callback))) {
$choices = call_user_func(array($this->context->getClassName(), $constraint->callback));
} elseif (is_callable($constraint->callback)) {
$choices = call_user_func($constraint->callback);
} else {
Expand Down

0 comments on commit 4b75754

Please sign in to comment.