WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#20636 closed enhancement (fixed)

define ('RELOCATE', false) does the same thing as RELOCATE, true

Reported by: TomAuger Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit 3.5-early
Focuses: Cc:
PR Number:

Description

It's a little unintuitive that define('RELOCATE',false) and define('RELOCATE', true) do the same thing. A viable use-case is in development, leaving the RELOCATE defined, but set to false to easily switch it to 'true' when a site is moved.

Regardless of the use case, I recommend we change the check from

if ( defined( 'RELOCATE' ) )

to

if ( defined( 'RELOCATE' ) && RELOCATE === true )

on line 351 of wp-login.php

Attachments (1)

20636.1.patch (568 bytes) - added by JustinSainton 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @JustinSainton
8 years ago

Should just be able to check

if ( defined( 'RELOCATE' ) && RELOCATE )

#2 @nacin
8 years ago

Yes, checking for truthiness here seems proper. No need for identically here, as people will often use 1/0 as well.

#3 @JustinSainton
8 years ago

  • Keywords has-patch dev-feedback added

#4 @TomAuger
8 years ago

Good stuff. @JustinSainton thanks for patch. I'm away from my sandbox ATM.

#5 @SergeyBiryukov
8 years ago

  • Component changed from Graphic Design to Administration
  • Keywords commit 3.5-early added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

#6 @johnbillion
8 years ago

This also affects SUNRISE in the same manner, see #20220.

#7 @nacin
8 years ago

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

In [21251]:

Only obey the RELOCATE move flag if it evaluates to true. props TomAuger, JustinSainton, fixes #20636.

#8 @nacin
8 years ago

  • Milestone changed from Future Release to 3.5
Note: See TracTickets for help on using tickets.