Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#37668 closed defect (bug) (worksforme)

get_home_path() does not produce expected results when WordPress addr differs from site addr. (Tested 4.5.3, 4.6 RC 2)

Reported by: lsfoo's profile lsfoo Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.3
Component: Filesystem API Keywords:
Focuses: Cc:



To reproduce:
Installed in: SITE_ROOT/public_html/wordpress
WordPress Address:
Site Address:

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 =
pos = FALSE
home_path = ""
home_path = "/" trailing slash added

Change History (1)

#1 @desrosj
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi @lsfoo,

Welcome to Trac! Thanks for this ticket. And my apologies that it took so long to receive a response.

I have done some testing and I have been unable to reproduce the issue you are describing. There are also unit tests in the Core test suite that demonstrate this is working as expected.

I am going to close this out as worksforme, but if you are still experiencing this issue, feel free to reopen and provide more detailed steps to reproduce.

Note: See TracTickets for help on using tickets.