Opened 7 years ago
Closed 7 years ago
#7637 closed defect (bug) (fixed)
Improper use of `count()` in blog post activity media extractor
Reported by: | boonebgorges | Owned by: | djpaul |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | has-patch |
Cc: |
Description
See https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-functions.php?marks=3259#L3241. The members of 'has'
are already counts; they don't need to be run through count()
again. Doing so in PHP 7.2 throws errors (see https://travis-ci.org/buddypress/BuddyPress/jobs/310294527), while doing so before 7.2 introduces a silent bug where the para_count
is always decremented by 1 or 0.
@djpaul Ping for a quick review of the attached patch.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Yes, good find.