felixarntz / attachment-taxonomies

This plugin adds categories and tags to the WordPress media library - lightweight and developer-friendly.
https://wordpress.org/plugins/attachment-taxonomies/
GNU General Public License v3.0
29 stars 6 forks source link

Fix PHP missing var warning. #7

Closed tareiking closed 8 years ago

tareiking commented 8 years ago

$taxonomy->slug does not exist in this context, however $taxonomy->query_var does, lets use that instead.

felixarntz commented 8 years ago

Thanks @tareiking! Let's use $taxonomy_slug instead which is defined at this point and produces the result that $taxonomy->slug originally would have.

tareiking commented 8 years ago

Good suggestion, updated PR.

felixarntz commented 8 years ago

I think in line 124 you confused the two variable names, the first one ("name" attribute) should remain $taxonomy->query_var while the ID must be $taxonomy_slug.

tareiking commented 8 years ago

@felixarntz good catch! Updated.