Make WordPress Core

Ticket #44752: wp_get_archives.patch

File wp_get_archives.patch, 538 bytes (added by campusboy1987, 6 years ago)
  • wp-includes/general-template.php

    diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
    index 33fcfbb..bcddb5e 100644
    a b function wp_get_archives( $args = '' ) { 
    17231723                $r['type'] = 'monthly';
    17241724        }
    17251725
    1726         if ( ! empty( $r['limit'] ) ) {
     1726        if ( isset( $r['limit'] ) ) {
    17271727                $r['limit'] = absint( $r['limit'] );
    1728                 $r['limit'] = ' LIMIT ' . $r['limit'];
     1728                $r['limit'] = $r['limit'] ? ' LIMIT ' . $r['limit'] : '';
    17291729        }
    17301730
    17311731        $order = strtoupper( $r['order'] );