Opened 9 years ago
Closed 9 years ago
#43201 closed defect (bug) (fixed)
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-includes/media.php on line 1206
| Reported by: | codegrau | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9.5 |
| Component: | Media | Version: | 4.9.2 |
| Severity: | normal | Keywords: | good-first-bug has-patch fixed-major |
| Cc: | Focuses: |
Description
PHP Warning:
count(): Parameter must be an array or an object that implements Countable in /wp-includes/media.php on line 1206
Attachments (1)
Change History (8)
#1
@
9 years ago
- Component General → Media
- Keywords needs-patch good-first-bug added
- Milestone Awaiting Review → 4.9.4
This ticket was mentioned in Slack in #core-media by mike. View the logs.
9 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @codegrau, welcome to WordPress Trac! Thanks for the report.
This sounds like a plugin incorrectly using the
wp_calculate_image_srcsetfilter and returning a non-array. That said, we should make sure$sourcesis an array before callingcount().