Skip to content

PHP 8.4 ::walk(): Implicitly marking parameter $startAt as nullable is deprecated #25

@terr17216

Description

@terr17216

When loading a class I get an error
Deprecated: FreeDSx\\Snmp\\SnmpClient::walk(): Implicitly marking parameter $startAt as nullable is deprecated, the explicit nullable type must be used instead

Solved the problem by changing the method FreeDSx\Snmp\SnmpClient:

old:

public function walk(
        string $startAt = null,
        string $endAt = null
    ): SnmpWalk {
        return new SnmpWalk(
            $this,
            $startAt,
            $endAt
        );
    }

new:

public function walk(
        null|string $startAt,
        null|string $endAt
    ): SnmpWalk {
        return new SnmpWalk(
            $this,
            $startAt,
            $endAt
        );
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions