#3405 closed defect (bug) (fixed)
topic/forum notification emails not sent to some subscribers
Reported by: | muratgu | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6.6 | Priority: | high |
Severity: | major | Version: | 2.6.0 |
Component: | API - Subscriptions | Keywords: | needs-testing |
Cc: |
Description
The function bbp_get_email_addresses_from_user_ids builds an incomplete list of emails.
1379 // Get total number of sets
1380 $steps = ceil( count( $user_ids ) / $limit );
1381 $range = array_map( 'intval', range( 1, $steps ) );
1382
1383 // Loop through users
1384 foreach ( $range as $loop ) {
1385
1386 // Initial loop has no offset
1387 $offset = ( 1 === $loop )
1388 ? 0
1389 : $limit * $loop;
1390
1391 // Calculate user IDs to include
1392 $loop_ids = array_slice( $user_ids, $offset, $limit );
The $offset calculation on line 1387 is not correct. The offset value jumps from 0 to 200, if the limit is 100, and skips everyone in between. It should have been like this:
1387 $offset = $limit * ($loop - 1);
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 7151: