Skip to content

Warning on NetworkSettings normalizer #3

@rodrigoaguilera

Description

@rodrigoaguilera

I am getting

<warning>PHP Warning:  foreach() argument must be of type array|object, null given in /vendor/beluga-php/docker-php-api/src/Normalizer/NetworkSettingsNormalizer.php on line 73</warning>

Calling containerInspect() for a container that has ports exposed on the image but no binding so the output of CLI docker inspect is

...
"NetworkSettings": {
            "Bridge": "",
            "SandboxID": "2b1a12bda80af0896525136538f1495c0097ae592134a387fa0ea3173804c1d3",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "9000/tcp": null
            },
...

I guess the daemon used to return an array for the port bindings instead of null.
I am using Docker Server Version: 20.10.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions