nexbridge
Forum Replies Created
-
I’m getting this as well on Debian 10.12 with WordPress 6.0 – the issue seems to have started when this plugin was upgraded to version 5.7.
UPDATE: Having applied the above fix, I’m now getting a similar issue reported for the following query (around line 800 in the same file), for which I imagine the same fix will work.
"SELECT YEAR(p.post_date_gmt) AS <code>year</code>, MONTH(p.post_date_gmt) AS <code>month</code>, COUNT(p.ID) AS <code>numposts</code>, MAX(p.post_modified_gmt) as <code>last_mod</code> FROM {$wpdb->posts} p WHERE p.post_password = '' AND p.post_type = '" . esc_sql( $post_type_custom ) . "' AND p.post_status = 'publish' " . $ex_post_s_q_l . '' . $ex_cat_s_q_l . " GROUP BY YEAR(p.post_date_gmt), MONTH(p.post_date_gmt) ORDER BY p.post_date_gmt DESC"UPDATE: Even when you apply the above fix, the same query then triggers the error below due to it being a prepared statement with no placeholders for variables.
Function wpdb::prepare was called <strong>incorrectly</strong>. The query argument of wpdb::prepare() must have a placeholder. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.9.0.) in /var/www/bulksmsdelivery.com/wp-includes/functions.php on line 5831A better fix would therefore be to add a placeholder for the value of p.post_type and add the value as the second argument of wpdb::prepare().