Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#31417 closed defect (bug) (fixed)

go_to function breaks when path isn't set

Reported by: joostdevalk's profile joostdevalk Owned by: boonebgorges's profile boonebgorges
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


When using go_to to go to the un-trailingslashed home, it fails because of a lacking path after the url is parsed.

Attachments (1)

patch-31417.diff (510 bytes) - added by joostdevalk 9 years ago.

Download all attachments as: .zip

Change History (3)

9 years ago


#1 @boonebgorges
9 years ago

  • Milestone changed from Awaiting Review to 4.2

Looks good. Thanks for the patch.

#2 @boonebgorges
9 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 31515:

Ensure that a request URL is always set in WP_UnitTestCase::go_to().

Failure to set this variable meant that passing the home URL to go_to()
(without a trailing slash) resulted in a PHP notice, and failed to reset the
globals properly.

Props joostdevalk.
Fixes #31417.

Note: See TracTickets for help on using tickets.