WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 11 months ago

Last modified 11 months ago

#20636 closed enhancement (fixed)

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

Reported by: TomAuger Owned by: nacin
Priority: normal Milestone: 3.5
Component: Administration Version:
Severity: normal Keywords: has-patch commit 3.5-early
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 14 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 JustinSainton14 months ago

Should just be able to check

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

comment:2 nacin14 months ago

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

JustinSainton14 months ago

comment:3 JustinSainton14 months ago

  • Keywords has-patch dev-feedback added

comment:4 TomAuger14 months ago

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

comment:5 SergeyBiryukov14 months 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

comment:6 johnbillion13 months ago

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

comment:7 nacin11 months 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.

comment:8 nacin11 months ago

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