[wp-trac] [WordPress Trac] #64849: Media: wp_get_image_alttext() incorrectly treats strpos() position 0 as "not found"
WordPress Trac
noreply at wordpress.org
Sat Mar 14 16:00:19 UTC 2026
#64849: Media: wp_get_image_alttext() incorrectly treats strpos() position 0 as
"not found"
------------------------------+------------------------
Reporter: suhan2411 | Owner: joedolson
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: Media | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+------------------------
Changes (by joedolson):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"62027" 62027]:
{{{
#!CommitTicketReference repository="" revision="62027"
Media: Fix logic when checking IPTC alt text meta data.
Fix two conditional checks for validity of data when importing alt text
from IPTC meta data. Strictly compare the results of `strpos()` as a
boolean, rather than treating 0 as false; return string if
`file_get_contents()` returns false.
Props suhan2411, pbiron, alexodiy, joedolson.
Fixes #64849.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64849#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list