Don't call wpdb_prepare with no arguments

This commit is contained in:
Jeremy Dormitzer 2018-11-11 22:38:43 -05:00
parent 9d0f98b627
commit b256295c0a
2 changed files with 6 additions and 6 deletions

View File

@ -311,10 +311,10 @@ function purge_all_data() {
$server->dispatch( $request );
}
$pfx = $wpdb->prefix;
$wpdb->query( $wpdb->prepare(
$wpdb->query(
"DROP INDEX OBJECTS_ACTIVITYPUB_ID_INDEX ON {$pfx}pterotype_objects"
) );
$wpdb->query( $wpdb->prepare(
);
$wpdb->query(
"
DROP TABLE {$pfx}pterotype_comments, {$pfx}pterotype_keys,
{$pfx}pterotype_blocks, {$pfx}pterotype_shares,
@ -323,7 +323,7 @@ function purge_all_data() {
{$pfx}pterotype_outbox, {$pfx}pterotype_inbox,
{$pfx}pterotype_actors, {$pfx}pterotype_objects
"
) );
);
\delete_option( 'pterotype_previously_migrated_version' );
}
?>

View File

@ -15,9 +15,9 @@ function get_actor( $id ) {
function get_all_actors() {
global $wpdb;
$results = $wpdb->get_results( $wpdb->prepare(
$results = $wpdb->get_results(
"SELECT * FROM {$wpdb->prefix}pterotype_actors"
) );
);
if ( ! $results || empty( $results ) ) {
return array();
}