stuttter / wp-media-categories

Categories for media & attachments
GNU General Public License v2.0
25 stars 8 forks source link

Inconsistency in the variable type of the function #6

Open Gonzalo2310 opened 3 years ago

Gonzalo2310 commented 3 years ago

When I make ajax calls I get a plugin error. Looking at the code I found this in: wp-media-categories/wp-media-categories/includes/functions.php

function wp_media_categories_update_count_callback( $terms = array(), $media_taxonomy = 'media_category' )
$prepared = $wpdb->prepare( $sql, $media_taxonomy->name, $media_taxonomy->name );

$media_taxonomy is defined as a string but used as an object.