Skip to content

Typo in get_post_type_taxonomies() - uses wrong variable #43

@DrakeRubicon

Description

@DrakeRubicon

Small bug in plugin/includes/cache-class.php:112:

private function get_post_type_taxonomies( $post_type ) {
    return get_object_taxonomies( $post->post_type );  // $post is undefined
}

Should be $post_type instead of $post->post_type.

Since $post doesn't exist in this scope, it passes null to get_object_taxonomies() which then returns all taxonomies instead of just the ones for the current post type.

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