From f403daa78b802c529f34f87bc73172e6ba7b9486 Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Mon, 6 May 2013 17:50:58 -0500 Subject: [PATCH] Correct use of `$wpdb->prepare()` to resolve PHP warning "Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/wp-cron-control/wp-cron-control.php on line 291 and defined in /wp-includes/wp-db.php...." --- wp-cron-control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-cron-control.php b/wp-cron-control.php index 8b4de06..86279a6 100644 --- a/wp-cron-control.php +++ b/wp-cron-control.php @@ -288,7 +288,7 @@ class WP_Cron_Control { global $wpdb; // grab all scheduled posts from posts table - $sql = $wpdb->prepare( "SELECT ID, post_date_gmt FROM $wpdb->posts WHERE post_status = 'future' " ); + $sql = $wpdb->prepare( "SELECT ID, post_date_gmt FROM $wpdb->posts WHERE post_status = %s", 'future' ); $results = $wpdb->get_results( $sql ); $return = true; -- GitLab