backtick column names
-
I would like to request a code change. I would like to request that backticks be added to the column names in the method: Jetpack_Sitemap_Librarian::get_sanitized_post_columns($wpdb). I’m sure it can be done different ways, but I solved it temporarily by changing line 483 to:
return '' . implode( ',', array_map( 'esc_sql', $columns ) ) . '';I was getting a sql error due to having a column name that is a keyword (
order) in my wp_posts table. I’m not sure what plugin added that column in the past (nor whether it is even used still), but escaping the column names takes care of the problem.This problem was discovered when it conflicted with Solid Backups Legacy plugin causing the backup to fail.
Thank you for considering this change.
You must be logged in to reply to this topic.