WP_Date_Query table prefixing
|Reported by:||ew_holmes||Owned by:|
|Component:||Query||Keywords:||3.9-early needs-refresh needs-unit-tests|
I believe I've found a bug within WP_Date_Query. The lack of a $wpdb table prefix will break queries that have any joins put into them.
If the $column specified is within the posts table, the $column variable is not being prefixed by $wpdb->posts as it should be.
Alternatively, if you are comparing comment_date or comment_date_gmt, $wpdb->comments should be prefixed.
Change History (24)
- Keywords has-patch needs-testing dev-feedback added; needs-patch removed
comment:5 SergeyBiryukov — 4 months ago
- Milestone changed from Awaiting Review to 3.8
- Version changed from 3.7.1 to 3.7
comment:7 wonderboymusic — 4 months ago
- Keywords needs-unit-tests added; needs-testing dev-feedback removed
comment:10 nunomorgadinho — 3 months ago
- Cc nuno.morgadinho@… added
- Keywords needs-unit-tests removed
comment:15 nacin — 3 months ago
- Keywords 3.9-early added
- Milestone changed from 3.7.2 to Future Release