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

buddypress-trac noreply at wordpress.org
Fri Feb 18 23:05:02 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     |
--------------------------+---------------------
Changes (by r-a-y):

 * owner:  (none) => r-a-y
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13235" 13235]:
 {{{
 #!CommitTicketReference repository="" revision="13235"
 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 (10-branch)
 }}}

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


More information about the buddypress-trac mailing list