[buddypress-trac] [BuddyPress Trac] #7637: Improper use of `count()` in blog post activity media extractor

buddypress-trac noreply at wordpress.org
Sat Dec 2 02:36:57 UTC 2017


#7637: Improper use of `count()` in blog post activity media extractor
--------------------------+-----------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.0
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------
 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.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7637>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list