Opened 10 months ago
Last modified 4 weeks ago
#57239 new defect (bug)
Notice undefined array keys width and height when using full svg image
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.1.1 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
If you add media like an svg and use it with the "full size" option the width and height are not fetched. Currently the function (wp-includes/media.php line 1185) expects those array keys.
Change History (3)
This ticket was mentioned in PR #3711 on WordPress/wordpress-develop by JoeyJanson.
10 months ago
#1
#3
in reply to:
↑ 2
@
4 weeks ago
Replying to florianreintgen:
Had the same problem today, looking for a solution for this
Well I fixed this in december 2022 and also delivered a pull request but it is not merged, used or responded so no clue if it will ever be fixed.. PR link to see the change: https://github.com/WordPress/wordpress-develop/pull/3711
Note: See
TracTickets for help on using
tickets.
If you add media like an svg and use it with the "full size" option the width and height are not fetched. Currently the function expects those array keys. This PR checks both of the keys and if one of the keys are empty return false.
Trac ticket: 57239