Opened 6 days ago
Last modified 6 days ago
#64742 new defect (bug)
PHP 8.5: Incorrect array access in `wp_get_attachment_image_src`
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | minor | Version: | 4.4 |
| Component: | General | Keywords: | good-first-bug has-patch |
| Focuses: | php-compatibility | Cc: |
Description
Warning at /wp-json/oembed/1.0/embed?url=https%3A%2F%2Fshkspr.mobi%2Fblog%2Fabout%2F&format=xml: [2] Cannot use bool as array in /wp-includes/embed.php on line 742
function get_oembed_response_data_rich( $data, $post, $width, $height ) {
[…]
list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $thumbnail_id, array( $width, 0 ) );
wp_get_attachment_image_src() returns array|false - but this only expects an array.
Change History (2)
#1
@
6 days ago
- Keywords good-first-bug added
- Milestone changed from Awaiting Review to 7.0
- Version changed from 6.9.1 to 4.4
This ticket was mentioned in PR #11073 on WordPress/wordpress-develop by @hbhalodia.
6 days ago
#2
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/64742
## Use of AI Tools