Skip to content

Commit fdafcd3

Browse files
committed
Code Quality: Return null instead of void in paginate_links().
Developed in #10999 Follow-up to r32598. Props apermo, mukesh27, westonruter See #64238. Fixes #64694. git-svn-id: https://develop.svn.wordpress.org/trunk@61719 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9e4cb58 commit fdafcd3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-includes/general-template.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4655,8 +4655,8 @@ function language_attributes( $doctype = 'html' ) {
46554655
* @type string $before_page_number A string to appear before the page number. Default empty.
46564656
* @type string $after_page_number A string to append after the page number. Default empty.
46574657
* }
4658-
* @return string|string[]|void String of page links or array of page links, depending on 'type' argument.
4659-
* Void if total number of pages is less than 2.
4658+
* @return string|string[]|null String of page links or array of page links, depending on 'type' argument.
4659+
* Null if total number of pages is less than 2.
46604660
*/
46614661
function paginate_links( $args = '' ) {
46624662
global $wp_query, $wp_rewrite;
@@ -4722,7 +4722,7 @@ function paginate_links( $args = '' ) {
47224722
// Who knows what else people pass in $args.
47234723
$total = (int) $args['total'];
47244724
if ( $total < 2 ) {
4725-
return;
4725+
return null;
47264726
}
47274727
$current = (int) $args['current'];
47284728
$end_size = (int) $args['end_size']; // Out of bounds? Make it the default.

0 commit comments

Comments
 (0)