Opened 7 years ago
Closed 7 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 |
---|---|---|---|
Milestone: | 4.9.5 | Priority: | normal |
Severity: | normal | Version: | 4.9.2 |
Component: | Media | Keywords: | good-first-bug has-patch fixed-major |
Focuses: | Cc: |
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
@
7 years ago
- Component changed from General to Media
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 4.9.4
Version 0, edited 7 years ago
by
(next)
This ticket was mentioned in Slack in #core-media by mike. View the logs.
7 years ago
#4
@
7 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 42639:
Note: See
TracTickets for help on using
tickets.
Hi @codegrau, welcome to WordPress Trac! Thanks for the report.
This sound like a plugin incorrectly using the
wp_calculate_image_srcset
filter and returning a non-array. That said, we should make sure$sources
is an array before callingcount()
.