Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Fix Invalid argument foreach #2

Open
wants to merge 2 commits into
base: 4.1.36
Choose a base branch
from
Open

Fix Invalid argument foreach #2

wants to merge 2 commits into from

Conversation

SBordier44
Copy link

@@ -57,8 +57,11 @@ public function denormalize($data, $class, $format = null, array $context = [])
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($data->{'Ports'} as $key => $value) {
$values_1 = [];
foreach ($value as $value_1) {
$values_1[] = $this->denormalizer->denormalize($value_1, 'Docker\\API\\Model\\PortBinding', 'json', $context);
if($value)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use if(is_iterable($value))?

@hanovruslan
Copy link

ping

@hanovruslan
Copy link

ping @nathandesmet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants