[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: bantu
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

Hi,

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.

Examples:

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.
Sam



 Comments   
Comment by bantu [ 18/May/12 ]

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

Comment by olympe [ 18/May/12 ]

Hi,

Thanks for your reply. Perfect bugfix.

Best regards.
Sam

Comment by brunoais [ 23/May/12 ]

The ?> is not there and all seems correct

Generated at Fri Oct 19 09:49:43 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.