From b256295c0a57934b6a199e586484fad9d37a58e9 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 11 Nov 2018 22:38:43 -0500 Subject: [PATCH] Don't call wpdb_prepare with no arguments --- includes/schema.php | 8 ++++---- includes/server/actors.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/schema.php b/includes/schema.php index 049e7e1..15a2435 100644 --- a/includes/schema.php +++ b/includes/schema.php @@ -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' ); } ?> diff --git a/includes/server/actors.php b/includes/server/actors.php index 88d0784..06fe690 100644 --- a/includes/server/actors.php +++ b/includes/server/actors.php @@ -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(); }