Skip to content

Add warnings for undesired changes to plugin hook return values #4390

@TheWitness

Description

@TheWitness

Describe the bug

The Cacti plugin API is dependent on plugin authors returning certain structures to be used by other plugin authors. These structures should ALWAYS be returned. Otherwise errors can be thrown by plugins that assume that they are set.

In the event this happens, Cacti should make every effort to detect this and warn the user who can then either correct this issue, or report it to the plugin maintainer.

Expected behavior

Cacti should do a better job of detecting cases where plugin authors are not using good form when authoring plugins.

Screenshots

Below is an example of the new error that will be logged in the case of a chaining event when there is greater than one plugin using the hook function.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementGeneral tag for an enhancementresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions