Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#6791 closed enhancement (fixed)

Eliminate closing ?>'s from wp-config-sample.php

Reported by: otto42's profile Otto42 Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords:
Focuses: Cc:

Description

One of the most frequent problems mentioned on the forum is the "blank line" problem. This is where some file contains a blank line before or after the <?php .. ?> tags that causes either header issues (which will prevent login's due to cookies not working) or causes invalid feed issues (which is recently a major problem with FeedBurner, since they stopped accepting invalid feeds).

It is described better here:
http://feedvalidator.org/docs/error/WPBlankLine.html

I recommend eliminating the use of the closing ?> tag in the wp-config.php file entirely. This will prevent text editors that introduce blank lines or excess spacing from breaking bits of the site by doing so. Since this file is pure PHP, the closing tag is optional anyway, and leaving it off ensures that the PHP interpreter does not produce output from it.

Reference this as well:
http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html

Attachments (1)

config.2.diff (295 bytes) - added by Otto42 17 years ago.
Patch to remove config file closing marker

Download all attachments as: .zip

Change History (5)

@Otto42
17 years ago

Patch to remove config file closing marker

#1 @jacobsantos
16 years ago

If this is going to be done, then we should take a step further and remove the closing PHP tag from all WordPress library files.

#2 @mrmist
16 years ago

+1 for this.

#3 @ryan
16 years ago

  • Milestone changed from 2.9 to 2.8

#4 @ryan
16 years ago

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

(In [10252]) Eliminate closing ?>'s from wp-config-sample.php. Props Otto42. fixes #6791

Note: See TracTickets for help on using tickets.