Skip to content

Commit

Permalink
Fixed possible bug assuming class implements Traversable
Browse files Browse the repository at this point in the history
  • Loading branch information
raulfraile committed Dec 22, 2014
1 parent 8fa1303 commit 65d3e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SupportChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function isFormatChainSupported(FormatChainInterface $formatChain)
return false;
}

foreach ($formatChain as $format) {
foreach ($formatChain->getChainFormats() as $format) {
if (false === $this->isFormatSupported($format)) {
return false;
}
Expand All @@ -108,7 +108,7 @@ public function getUnsupportedFormatsFromChain(FormatChainInterface $formatChain
{
$formats = [];

foreach ($formatChain as $format) {
foreach ($formatChain->getChainFormats() as $format) {
if (false === $this->isFormatSupported($format)) {
$formats[] = $format;
}
Expand Down

0 comments on commit 65d3e0d

Please sign in to comment.