Ticket #6791 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

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

Reported by: Otto42 Owned by: anonymous
Priority: normal Milestone: 2.8
Component: General Version: 2.5
Severity: normal Keywords:
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

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

Change History

Otto424 years ago

Patch to remove config file closing marker

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.

+1 for this.

comment:3   ryan3 years ago

  • Milestone changed from 2.9 to 2.8

comment:4   ryan3 years ago

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

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

Note: See TracTickets for help on using tickets.