Skip to content

Creation of dynamic property phpzabbix\JSONRPC\Response::$error is deprecated #8

@remidejong

Description

@remidejong

In PHP 8.2 and later, setting a value to an undeclared class property is deprecated, and emits a deprecation notice the first time the property is set during the lifetime of the application execution.

This line below emits the deprecation notice:

$resp->error = Error::from_json_obj($data->error);

Ideally, classes should declare the dynamic properties in the class to avoid the deprecation notice

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions