[buddypress-trac] [BuddyPress Trac] #8633: Pagination broken in `BP_Blogs_Blog::get()`

buddypress-trac noreply at wordpress.org
Fri Feb 18 23:06:22 UTC 2022


#8633: Pagination broken in `BP_Blogs_Blog::get()`
--------------------------+---------------------
 Reporter:  r-a-y         |       Owner:  r-a-y
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  10.1.0
Component:  Blogs         |     Version:  10.0.0
 Severity:  major         |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by r-a-y):

 In [changeset:"13236" 13236]:
 {{{
 #!CommitTicketReference repository="" revision="13236"
 Blogs: Fix pagination in `BP_Blogs_Blog::get()`.

 As part of #8488, we refactored `BP_Blogs_Blog::get()` to use an array
 as the main function argument instead of passing multiple function
 arguments.

 In `BP_Blogs_Blog::get()`, the "per page" argument was previously
 `$limit`, while in `bp_blogs_get_blogs()`, the "per page" argument
 passed to `BP_Blogs_Blog::get()` is `$r['per_page']`. When swapping
 over to the array function argument, `$r['limit']` does not exist,
 which broke pagination and would return all blogs instead.

 This commit fixes the pagination problem by renaming the array key
 from `$r['limit']` to `$r['per_page']`.

 Props imath.

 Fixes #8633 (trunk)
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8633#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list