[PHPBB3-10898] Do not write ?> into config.php to avoid whitespace output Created: 18/May/12  Updated: 23/May/12  Resolved: 18/May/12

Status: Closed
Project: phpBB3
Component/s: Viewing posts
Affects Version/s: 3.0.10
Fix Version/s: 3.0.11-RC1

Type: Improvement Priority: Minor
Reporter: olympe Assignee: Andreas Fischer
Resolution: Fixed Votes: 0
Labels: None

Fix URL: https://github.com/phpbb/phpbb3/pull/808



I do not know if we can consider this as a bug but it could be interesting to fix it. The problem is when you have a blank line (\n) after the "?>" in the config.php file, the download/file does not display avatars anymore because a problem of character.

How to reproduce:

Just add a blank line after the end of php script "?>" and reload an avatar display.


With a blank line: (image) http://community.olympe.in/download/file1.php?avatar=121_1337297805.png&header=yes
With blan line : (binary) http://community.olympe.in/download/file1.php?avatar=121_1337297805.png

Without blank line (image) http://community.olympe.in/download/file2.php?avatar=121_1337297805.png&header=yes
Without blank line (binary) http://community.olympe.in/download/file2.php?avatar=121_1337297805.png

Web observe a small difference between the two binaries at the end (just on char).

Best regards.

Comment by Andreas Fischer [ 18/May/12 ]

This problem could be completely avoided by removing "?>" completely from the generated config.php file.

Comment by olympe [ 18/May/12 ]


Thanks for your reply. Perfect bugfix.

Best regards.

Comment by brunoais [ 23/May/12 ]

The ?> is not there and all seems correct

Generated at Sat Feb 16 08:00:32 UTC 2019 using Jira 7.12.3#712004-sha1:5ef91d760d7124da5ebec5c16a948a4a807698df.