Skip to content

🐞 Bug Report: Fatal error when an existing upgrader_source_selection returns an error #400

@johnbillion

Description

@johnbillion

Detailed Description

The upgrader_source_selection filter can accept and return a string or a WP_Error, but the methods in FAIR Connect that hook into this filter use a string type declaration. If another plugin is using the upgrader_source_selection filter on a lower priority and returns a WP_Error then FAIR Connect triggers a fatal type error.

Steps to reproduce

add_filter( 'upgrader_source_selection', fn() => new WP_Error( 'oh', 'no' ), 9 );

Put this code into a place on a site and then attempt to perform an update on a plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Status

    In progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions