Do you know which plugin is causing this error? Are there any pending plugin updates? Please take backup of the site and update the plugins. Probably update may fix the error.
This issue is usually caused by plugins. Please go to Installed Plugins in the backend, locate any plugin related to wppa_albums, and disable it.
I am the developer of this plugin wp-photo-album-plus and i want to improve it so plugin-check no longer generates errors.
The problem is a direct SQL query without a prepared statement. This should work:
$placeholders = implode( ',', array_fill( 0, count( $all_ids ), '%d' ) );
$results = $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM $wpdb->wppa_albums WHERE id IN ($placeholders)",
$all_ids
),
ARRAY_A
);
Thank you very much, It works, so now i can also fix the other 80 locations with the same issue.
I noticed that you can not have additional other placeholders when there is an array, so the LIMIT clause i implemented as follows:
(other example)
$placeholders = implode( ',', array_fill( 0, count( $photo_array ), '%d' ) );
$the_args = $photo_array;
$the_args[] = $skip;
$the_args[] = $pagesize;
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos WHERE id IN ($placeholders) LIMIT %d, %d", $the_args ), ARRAY_A );