[wp-trac] [WordPress Trac] #39768: Incorrect image returned with attachment_url_to_postid()
WordPress Trac
noreply at wordpress.org
Sun Dec 22 16:52:15 UTC 2019
#39768: Incorrect image returned with attachment_url_to_postid()
--------------------------+---------------------
Reporter: ben.greeley | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.4
Component: Media | Version: 4.7.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Changes (by SergeyBiryukov):
* milestone: Awaiting Review => 5.4
Comment:
Replying to [comment:4 archon810]:
> I'm really not sure why `-1` isn't appended, and in my test just now it
did
Yes, it appears to be fixed with the introduction of
`_wp_check_existing_file_names()` in 5.3.1, [46822] / #42437, so should
not be an issue going forward.
I'm up for updating the query in `attachment_url_to_postid()` to be case-
sensitive and handle already existing images, if that does not reduce
performance.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39768#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list