Indeed, i got the same error on a project i’m working right now.
After a quick check of the 4.8.2 update, i’ve seen that was changed the file wp-db.php in a point about the preparing queries.
Infact, from:
https://codex.wordpress.org/Version_4.8.2
$wpdb->prepare() can create unexpected and unsafe queries leading to potential SQL injection (SQLi). WordPress core is not directly vulnerable to this issue, but we’ve added hardening to prevent plugins and themes from accidentally causing a vulnerability. Reported by Slavco.
I suspect that’s related to the mentioned problem.
-
This reply was modified 5 years, 4 months ago by
Rics1983.
Hi,
Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().
Please change the following query.
Before Changing query:
$results = $wpdb->get_results(
$wpdb->prepare( ‘
SELECT internal_link_count, incoming_link_count, object_id
FROM ‘ . $storage->get_table_name() . ‘
WHERE object_id IN ( %1$s )’,
implode( ‘,’, $post_ids )
),
ARRAY_A
);
After Changing query:
$imploded_post_ids = implode( ‘,’, $post_ids );
$results = $wpdb->get_results(
‘SELECT internal_link_count, incoming_link_count, object_id
FROM ‘ . $storage->get_table_name() . ‘
WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
);
and check.
This will help you.
I would wait for a reply by the plugin author.
That’s not a safe solution, just temporary workaround.
Hello,
This issue has been corrected in the latest release of the Yoast plugin. Please update to Yoast SEO 5.4.1.
Thanks!
Same thing happend on my blog. Is that mean when i update to Yoast SEO 5.4.1, this error will disappear? @ plugin support