Opened 2 years ago
Last modified 2 years ago
#57272 new defect (bug)
Bug in main query
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.1.1 |
Component: | General | Keywords: | has-patch reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
Hello community,
After a days of debugging i found a bug in wordpress core related to query var 'm', in the case that allows to get posts of a month.
wp-includes/class-wp-query.php in this bloc
<?php if ( $q['m'] ) { if(strlen( $q['m'] ) == 6){
i changed the where statement :
<?php $where .= " AND {$wpdb->posts}.post_date <= '$end_date' AND {$wpdb->posts}.post_date >= '$start_date' ";
to :
<?php $where .= " AND {$wpdb->posts}.post_date <= '$end_date 23:59:59' AND {$wpdb->posts}.post_date >= '$start_date' ";
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Thanks for the report @brahimwpk . What's the actual bug you're seeing please?