Skip to content

Commit 65d3e0d

Browse files
committed
Fixed possible bug assuming class implements Traversable
1 parent 8fa1303 commit 65d3e0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SupportChecker.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function isFormatChainSupported(FormatChainInterface $formatChain)
9292
return false;
9393
}
9494

95-
foreach ($formatChain as $format) {
95+
foreach ($formatChain->getChainFormats() as $format) {
9696
if (false === $this->isFormatSupported($format)) {
9797
return false;
9898
}
@@ -108,7 +108,7 @@ public function getUnsupportedFormatsFromChain(FormatChainInterface $formatChain
108108
{
109109
$formats = [];
110110

111-
foreach ($formatChain as $format) {
111+
foreach ($formatChain->getChainFormats() as $format) {
112112
if (false === $this->isFormatSupported($format)) {
113113
$formats[] = $format;
114114
}

0 commit comments

Comments
 (0)