[jira] Created: (STOMP-6) PHP client: Trailing newlines in Stomp.php cause premature page output

View: New views
1 Messages — Rating Filter:   Alert me  

[jira] Created: (STOMP-6) PHP client: Trailing newlines in Stomp.php cause premature page output

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

PHP client: Trailing newlines in Stomp.php cause premature page output
----------------------------------------------------------------------

                 Key: STOMP-6
                 URL: http://jira.codehaus.org/browse/STOMP-6
             Project: Stomp
          Issue Type: Bug
            Reporter: Arto Bendiken
            Priority: Trivial
         Attachments: Stomp.php.diff

Present-day PHP best practice mandates leaving off the closing "?>" tag in source files (see e.g. http://drupal.org/node/545) so as to avoid any accidental trailing newlines after the tag starting the page output prematurely and thus causing the infamous "headers already sent" error later in the main script when it tries to set HTTP headers.

The current Stomp.php indeed induces accidental page output and these errors due to two trailing newlines after the "?>" tag, when used e.g. with the Drupal content management system.

The fix is trivial: simply leave off the "?>" tag, as the attached patch does.



--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email