[wp-trac] [WordPress Trac] #27834: wp_get_archives invalid query

WordPress Trac noreply at wordpress.org
Wed Apr 16 13:51:10 UTC 2014


#27834: wp_get_archives invalid query
-------------------------+-------------------------------------------------
 Reporter:  westi        |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Future Release
 Priority:  normal       |    Version:  trunk
Component:  Appearance   |   Keywords:  needs-patch good-first-bug needs-
 Severity:  normal       |  unit-tests
  Focuses:  template     |
-------------------------+-------------------------------------------------
 {{{
 wp_get_archives( array( 'limit' => 0 ) );
 }}}

 Generates:

 {{{
 SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID)
 as posts FROM wp_posts  WHERE post_type = 'post' AND post_status =
 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date
 DESC 0
 }}}

 We should just ignore a limit of 0 and fallback to the default IMHO

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27834>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list