Make WordPress Core

Opened 10 years ago

Closed 10 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:

Description

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 10 years ago.
Patch

Download all attachments as: .zip

Change History (3)

@joostdevalk
10 years ago

Patch

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 4.2

Looks good. Thanks for the patch.

#2 @boonebgorges
10 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.