[wp-trac] [WordPress Trac] #64849: Media: wp_get_image_alttext() incorrectly treats strpos() position 0 as "not found"
WordPress Trac
noreply at wordpress.org
Thu Mar 12 08:21:41 UTC 2026
#64849: Media: wp_get_image_alttext() incorrectly treats strpos() position 0 as
"not found"
-------------------------------------+------------------------------
Reporter: suhan2411 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------------------
Comment (by suhan2411):
A patch has been proposed in the GitHub mirror:
https://github.com/WordPress/wordpress-develop/pull/11237
This fixes the {{{strpos()}}} comparison in {{{wp_get_image_alttext()}}}
and adds a guard for file_get_contents() returning false.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64849#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list