Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Nullable foreach value bug#4

Open
bkayranci wants to merge 1 commit into
docker-php:4.1.36docker-php/docker-php-api:4.1.36from
bkayranci:bug-fix-nullable-foreach-variablebkayranci/docker-php-api:bug-fix-nullable-foreach-variableCopy head branch name to clipboard
Open

Nullable foreach value bug#4
bkayranci wants to merge 1 commit into
docker-php:4.1.36docker-php/docker-php-api:4.1.36from
bkayranci:bug-fix-nullable-foreach-variablebkayranci/docker-php-api:bug-fix-nullable-foreach-variableCopy head branch name to clipboard

Conversation

@bkayranci

Copy link
Copy Markdown

ErrorException thrown with message "Invalid argument supplied for foreach()"

Stacktrace:

#65 ErrorException in /path/vendor/docker-php/docker-php-api/src/Normalizer/NetworkSettingsNormalizer.php:60
#64 Illuminate\Foundation\Bootstrap\HandleExceptions:handleError in /path/vendor/docker-php/docker-php-api/src/Normalizer/NetworkSettingsNormalizer.php:60
#63 Docker\API\Normalizer\NetworkSettingsNormalizer:denormalize in /path/vendor/symfony/serializer/Serializer.php:177
#62 Symfony\Component\Serializer\Serializer:denormalize in /path/vendor/docker-php/docker-php-api/src/Normalizer/ContainersIdJsonGetResponse200Normalizer.php:122
#61 Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer:denormalize in /path/vendor/symfony/serializer/Serializer.php:177
#60 Symfony\Component\Serializer\Serializer:denormalize in /path/vendor/symfony/serializer/Serializer.php:128
#59 Symfony\Component\Serializer\Serializer:deserialize in /path/vendor/docker-php/docker-php-api/src/Endpoint/ContainerInspect.php:76
#58 Docker\API\Endpoint\ContainerInspect:transformResponseBody in /path/vendor/jane-php/open-api-runtime/Client/Psr7HttplugEndpointTrait.php:18
#57 Docker\API\Endpoint\ContainerInspect:parsePSR7Response in /path/vendor/jane-php/open-api-runtime/Client/Psr7HttplugClient.php:48
#56 Jane\OpenApiRuntime\Client\Psr7HttplugClient:executePsr7Endpoint in /path/vendor/docker-php/docker-php-api/src/Client.php:81
#55 Docker\API\Client:containerInspect in /path/app/Http/Controllers/DockerController.php:113

…/vendor/docker-php/docker-php-api/src/Normalizer/NetworkSettingsNormalizer.php:60

Fragment of docker inspect command:

       "8302/udp": null,
        "8500/tcp": [
            {
                "HostIp": "0.0.0.0",
                "HostPort": "32792"
            }
        ],

@Blizzke

Blizzke commented Jan 4, 2019

Copy link
Copy Markdown

This probably won't be merged as it happens in a generated file.
It's the swagger definition that needs to be updated to fix this.

That being said, I just ran against the same problem. An exposed but not mapped port is returned as '<port>/<protocol>' => null (API 1.39)

See also:
screenshot 2019-01-04 at 14 19 08

Can this situation possible be handled?

Edit: guess we're not the only ones:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.