Replaced call that triggers deprecated error

This commit is contained in:
Florin Patan 2013-01-31 14:13:11 +02:00
parent 6c00ffe90f
commit d0341e84ab

View File

@ -45,8 +45,8 @@ class ChoiceValidator extends ConstraintValidator
}
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 {