Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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