WordPress.org

WordPress build repository browser

Changeset 42531


Ignore:
Timestamp:
02/12/18 21:12:35 (10 days ago)
Author:
SergeyBiryukov
Message:

Comments: Avoid a PHP notice in paginate_comments_links() if type argument is set to array.

The function is a wrapper for paginate_links(), which returns an array if requested.

Props anantajitjg.
Fixes #43299.
Built from https://develop.svn.wordpress.org/trunk@42703

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r42489 r42531  
    37693769 *     @type string $after_page_number  A string to append after the page number. Default empty. 
    37703770 * } 
    3771  * @return array|string|void String of page links or array of page links. 
     3771 * @return string|array|void String of page links or array of page links. 
    37723772 */ 
    37733773function paginate_links( $args = '' ) { 
  • trunk/wp-includes/link-template.php

    r42506 r42531  
    28972897 * 
    28982898 * @param string|array $args Optional args. See paginate_links(). Default empty array. 
    2899  * @return string|void Markup for pagination links. 
     2899 * @return string|array|void Markup for comment page links or array of comment page links. 
    29002900 */ 
    29012901function paginate_comments_links( $args = array() ) { 
     
    29262926    $page_links = paginate_links( $args ); 
    29272927 
    2928     if ( $args['echo'] ) { 
     2928    if ( $args['echo'] && 'array' !== $args['type'] ) { 
    29292929        echo $page_links; 
    29302930    } else { 
  • trunk/wp-includes/version.php

    r42530 r42531  
    55 * @global string $wp_version 
    66 */ 
    7 $wp_version = '5.0-alpha-42702'; 
     7$wp_version = '5.0-alpha-42703'; 
    88 
    99/** 
Note: See TracChangeset for help on using the changeset viewer.