[wp-trac] [WordPress Trac] #28970: wp_get_attachment_url 0 === should be false ===

WordPress Trac noreply at wordpress.org
Mon Jul 21 04:56:04 UTC 2014


#28970: wp_get_attachment_url 0 === should be false ===
-------------------------------+------------------------------
 Reporter:  brashell           |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Media              |     Version:  3.9.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => reporter-feedback


Comment:

 The code (introduced in [8796]) is correct.

 We check if `$uploads['basedir']` exists in `$file`, and if it does, we
 replace it with `$uploads['baseurl']`. Replacing it if it does not exist
 would not make any sense.

 > I will also note this was uploaded via a plugin I made.

 1. Could you provide the uploading code from your plugin?
 2. What are `$uploads['basedir']` and `$uploads['baseurl']` values in your
 case?
 3. Does the issue happen with regular uploads?

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


More information about the wp-trac mailing list