Skip to content

get_queried_object() is not always set, triggering multiple fatal errors in execute() #6

@wgroenewold

Description

@wgroenewold

protected function execute() assumes get_queried_object() will always return something, but sometimes returns NULL (example: when $userid is not set and an author page is triggered).

Patch: check if isset(get_queried_object()) && get_queried_object !== NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions