Project

General

Profile

Actions

Bug #17608

closed

chr(10) after closing php tag

Added by Thomas Breuss about 17 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-09-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In different files there is a chr(10) after the closing php tag (?>).

Example:
t3lib/class.t3lib_cs.php
t3lib/class.t3lib_div.php

This is not really correct, since PHP recommends to delete any characters after the closing php tag.
Or it could result in a error like "Warning: Cannot modify header information - headers already sent by".

(issue imported from #M6354)


Files

0006354__4_1_2.patch (70.1 KB) 0006354__4_1_2.patch Administrator Admin, 2007-09-17 14:42
0006354__trunk.patch (74.8 KB) 0006354__trunk.patch Administrator Admin, 2007-09-17 14:42
Actions #1

Updated by Oliver Hader about 17 years ago

I can confirm this issue.

Actions #2

Updated by Oliver Hader about 17 years ago

The atttached patches remove found spaces/newslines after the closing tag "?>" of *.php and *.inc files of the TYPO3_4-1 branch and Trunk.

Actions #3

Updated by Thomas Breuss about 17 years ago

Maybe it's a idea to NOT using this closing tags in future?

See: http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html

B.2. PHP File Formatting
B.2.1. General
For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP. Not including it prevents trailing whitespace from being accidentally injected into the output.

Actions #4

Updated by Georg Ringer over 13 years ago

  • Status changed from Accepted to Closed
  • Target version deleted (0)

cleaned already

Actions

Also available in: Atom PDF