[ 
https://issues.apache.org/jira/browse/THRIFT-718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839777#action_12839777
 ] 

David Reiss commented on THRIFT-718:
------------------------------------

bq. Closing tags on their own are fine, but can potentially cause problems 
because any characters afterwards will cause output to be sent to the browser 
(unless output buffering is enabled) before headers are sent - cue PHP WARNING.
bq. In the case of the Thrift interface, it seems you've intentially added 
characters (yes, by whitespace I meant the LFs) after the closing tags. This 
illustrates why closing tags are dangerous.
Are you under the impression that the Thrift libraries are currently outputting 
newlines?  They are not.

I find the Zend guideline link compelling.  Mark, Chris G, what do you think?

Please resubmit your patch with newlines at EOF.

> Thrift PHP library includes closing tags and extraneous whitespace
> ------------------------------------------------------------------
>
>                 Key: THRIFT-718
>                 URL: https://issues.apache.org/jira/browse/THRIFT-718
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (PHP)
>            Reporter: Nicholas Telford
>         Attachments: thrift_php_closingTags.diff, thrift_php_closingTags2.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Extraneous whitespace after a PHP script's closing tag (?>) can cause big 
> problems when sending headers to the client.
> It is generally advised that closing PHP tags be omitted from the end of a 
> PHP file to prevent extraneous whitespace being an issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to