Opened 3 years ago
Closed 3 months ago
#57272 closed defect (bug) (invalid)
Bug in main query
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.1.1 |
| Component: | General | Keywords: | reporter-feedback close |
| 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 (5)
#3
@
5 months ago
- Keywords close added; has-patch removed
Hi @brahimwpk, are you still experiencing the issue? If so, could you provide more details? It's not exactly clear what bug you were seeing. Also, the screenshot of the code does not match the current logic in WP_Query, so I'm wondering if what you were seeing is fixed now.
#4
@
3 months ago
- Resolution set to invalid
- Status changed from new to closed
Hey all,
I think it is safe now to close this ticket is being closed due to inactivity. We haven't received any updates or responses from the reporter in over 3 years, and attempts to reproduce the issue have been unsuccessful. If the problem still exists, please provide more information or reopen the ticket, and we can take another look into this. 😃
Thanks for the report @brahimwpk . What's the actual bug you're seeing please?