[wp-trac] [WordPress Trac] #39768: Incorrect image returned with attachment_url_to_postid()

WordPress Trac noreply at wordpress.org
Sun Dec 22 22:11:53 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:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by archon810):

 @vsamoletov has a good point regarding the warning.

 But @SergeyBiryukov please consider the fact that while new cases may be
 resolved in 5.3.1, existing cases are still in the database and should be
 resolved properly.

 An alternate solution, and one we went with, is to get all the rows in PHP
 and if >1, go through them and do a case sensitive match in PHP.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39768#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list