NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
New files - should be without whitespace at EOF


Joined: 30 May 2006
Posts: 95
Reply with quote
Hi,

I have a very dummy suggestion - when creating new PHP file, there is always added extra line at the end of the empty file.
This may cause sometime problem throwing error Headers already sent... (e.g. generating PDFs online and streaming down to browser... would crash)

Sometime it is easy to overlook this extra line and might be annoying.

Scenario:
- in Workspace click right mouse New file -> select PHP and you will see:

SOF<?php

?>
-- empty line should not be here --
EOF

(SOF = start of file:-))

Thanx, if fixed:-))
Or thank you anyway for great IDE.

Lubos
View user's profileFind all posts by lubosdzSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
You can actually do that yourself. The templates for those files are stored under the Templates\ subdirectory.
You should probably make a habit of not specifying the "?>" at all (I removed it from the template for example).
It won't break your code and the risk of the "headers already sent" error is minimal Smile
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 30 May 2006
Posts: 95
Reply with quote
Thank you for this information, already fixed:-)
::L::
View user's profileFind all posts by lubosdzSend private message
Veteran

Joined: 22 May 2008
Posts: 141
Reply with quote
Really, the easiest fix is to simply leave off the closing ?> tag.

Its unnecessary, and I believe most code standards actually recommended that you leave it off.
View user's profileFind all posts by simshaunSend private message
New files - should be without whitespace at EOF
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic