Skip to:

Opened 4 months ago

Closed 4 months ago

#7637 closed defect (bug) (fixed)

Improper use of `count()` in blog post activity media extractor

Reported by: Boone Gorges Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Activity Keywords: has-patch


See 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, 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)

7637.diff (592 bytes) - added by Boone Gorges 4 months ago.

Download all attachments as: .zip

Change History (4)

@Boone Gorges
4 months ago

#1 @Boone Gorges
4 months ago

  • Component changed from Core to Activity
  • Owner set to djpaul
  • Status changed from new to reviewing

#2 @Paul Gibbs
4 months ago

Yes, good find.

#3 @djpaul
4 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 11756:

Activity: fix paragraph counting error when creating activity summaries.

Fixes #7637

Props boonebgorges

Note: See TracTickets for help on using tickets.