[wp-trac] [WordPress Trac] #37668: get_home_path() does not produce expected results when WordPress addr differs from site addr. (Tested 4.5.3, 4.6 RC 2)

WordPress Trac noreply at wordpress.org
Mon Aug 15 13:27:05 UTC 2016


#37668: get_home_path() does not produce expected results when WordPress addr
differs from site addr. (Tested 4.5.3, 4.6 RC 2)
----------------------------+-----------------------------
 Reporter:  lsfoo           |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Filesystem API  |    Version:  4.5.3
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 Hi,

 To reproduce:
 Installed in: SITE_ROOT/public_html/wordpress
 WordPress Address: http://example.com/wordpress
 Site Address: http://example.com/blog

 In this scenario, '/' is returned when 'SITE_ROOT/public_html/wordpress'
 is expected.

 I would submit a patch, but I am not sure which alternative variable
 should be used in this situation.

 Step-by-step within the function:
 wp_path_rel_to_home = http://example.com/wordpress
 pos = FALSE
 home_path = ""
 home_path = "/" // trailing slash added

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37668>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list