Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20636 closed enhancement (fixed)

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

Reported by: tomauger's profile TomAuger Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit 3.5-early
Focuses: Cc:

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 12 years ago.

Download all attachments as: .zip

Change History (9)

#1 @JustinSainton
12 years ago

Should just be able to check

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

#2 @nacin
12 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
12 years ago

  • Keywords has-patch dev-feedback added

#4 @TomAuger
12 years ago

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

#5 @SergeyBiryukov
12 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
12 years ago

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

#7 @nacin
12 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
12 years ago

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