Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
* 3.0:
  The exception should be thrown if an object doesn't implement Traversable AND doesn't implement Countable, not when it doesn't implement Traversable but DOES implement Countable
  [Form] fix violation mapper tests
  [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method
  don't rely on deprecated YAML parser feature
  • Loading branch information
fabpot committed Feb 17, 2016
2 parents d809df0 + 3c7b1ef commit 619dcdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Question/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function setAutocompleterValues($values)
}

if (null !== $values && !is_array($values)) {
if (!$values instanceof \Traversable || $values instanceof \Countable) {
if (!$values instanceof \Traversable || !$values instanceof \Countable) {
throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.');
}
}
Expand Down

0 comments on commit 619dcdc

Please sign in to comment.