Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#19869 closed defect (bug) (fixed)

Formatting from code block during network setup doesn't match wp-config.php

Reported by: ryanduff's profile ryanduff Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch commit
Focuses: Cc:

Description

In the process of network setup the block of code generate to be pasted into wp-config.php uses single space padding within parentheses. This doesn't match the rest of the formatting in wp-config.php

Simple code consistency fix.

Attachments (2)

network.diff (1.4 KB) - added by ryanduff 13 years ago.
19869.diff (1.4 KB) - added by ryanduff 13 years ago.

Download all attachments as: .zip

Change History (14)

@ryanduff
13 years ago

@ryanduff
13 years ago

#1 @DrewAPicture
13 years ago

  • Cc xoodrew@… added
  • Keywords 2nd-opinion added

I'm not sure this is valid. I know that WordPress coding standards normally calls for single spaces inside of opening and closing parentheses with functions and on both sides with if, foreach and switch statements. Shouldn't defining constants follow a similar pattern?

Last edited 13 years ago by DrewAPicture (previous) (diff)

#2 @ocean90
13 years ago

Shouldn't defining constants follow a similar pattern?

They should.

#3 @DrewAPicture
13 years ago

  • Cc xoodrew@… removed
  • Keywords 2nd-opinion removed
  • Resolution set to invalid
  • Status changed from new to closed

Shouldn't defining constants follow a similar pattern?

They should.

Maybe this should be the other way around, but not even the salts generator has spaces.

Last edited 13 years ago by DrewAPicture (previous) (diff)

#4 follow-ups: @SergeyBiryukov
13 years ago

I'd still vote for consistency though. Perhaps we should update wp-config-sample.php as per coding standards then?

#5 in reply to: ↑ 4 @DrewAPicture
13 years ago

Replying to SergeyBiryukov:

I'd still vote for consistency though. Perhaps we should update wp-config-sample.php as per coding standards then?

I can open a ticket. The salts generator would have to be updated too.

Version 0, edited 13 years ago by DrewAPicture (next)

#6 in reply to: ↑ 4 @ryanduff
13 years ago

Replying to SergeyBiryukov:

I'd still vote for consistency though. Perhaps we should update wp-config-sample.php as per coding standards then?

This was one of those that could go either way. Which file do you choose to fix and why... Agreed though, the changes probably should be in wp-config-sample.php

But at least it was brought to awareness. Sorry on the delayed reply... timezones ;)

#7 @DrewAPicture
13 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 3.3.1 to 3.0

From @nacin's comment:ticket:19870:3 in #19870

I'd rather just re-open #19869 and remove the spaces from multisite. We have slightly different standards for user-edited files as it is (for example, line endings), and I'd rather not cause confusion or have extra work done over a few spaces in a define() call.

#8 @SergeyBiryukov
13 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.4

#9 follow-ups: @MZAWeb
13 years ago

  • Cc MZAWeb added

This is really small and related, sorry if I should open a new ticket about this.

wp-config-sample.php is also missing the ?> php closing tag at the end.

#10 in reply to: ↑ 9 @ryanduff
13 years ago

Replying to MZAWeb:

This is really small and related, sorry if I should open a new ticket about this.

wp-config-sample.php is also missing the ?> php closing tag at the end.

There are various reasons for that. For starters, its optional. Secondly, it can help avoid whitespace issues that may cause the common white screen of death error.

#11 in reply to: ↑ 9 @SergeyBiryukov
13 years ago

Replying to MZAWeb:

wp-config-sample.php is also missing the ?> php closing tag at the end.

It was intentionally removed in #6791. Also came up in #10106.

#12 @nacin
13 years ago

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

In [19956]:

Align the spacing of the multisite constants with what has been long-established in wp-config and wp-config-sample. props ryanduff, fixes #19869.

Note: See TracTickets for help on using tickets.