Bogus DB query introduced in 2.78
-
Hi,
In Version 2.78, function dsq_request_handler(), case ‘export_comments’, the query to get max_post_id changed from
SELECT MAX(ID) …
to
SELECT MAX(%d)
(where $post_id is passed as second parameter to $wpdb->prepare()).
I’m not quite sure wether this is intentional, but it clearly looks wrong, because the result of the query now will alwys be $post_id, causing $eof to alwys beeing 1.
Here’s a diff to fix this (but please don’t apply without review). It also removes the here unneeded $wpdb->prepare() (there are no parameters involved, so no need to prepare anything):
https://volkswurst.de/presswurst/disqus-comment-system.diff
— kili
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bogus DB query introduced in 2.78’ is closed to new replies.