I have been using Auto Image Field plugin by Arturo on this blog site. Lately when i added a blog post, the wp-admin shouted an exception:
Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/auto-image-field/auto-image-field.php on line 102.
To fix this issue, remove all instances of “$wpdb->prepare” as below:
Change the below line from
$fields = $wpdb->get_results($wpdb->prepare(“SELECT * FROM $field_table_name WHERE 1”), ARRAY_A);
to:
$fields = $wpdb->get_results(“SELECT * FROM $field_table_name WHERE 1”, ARRAY_A);
This shall fix the issue.
You can also download the updated auto-image-field.php file.