View Issue Details

IDProjectCategoryView StatusLast Update
0016382mantisbtcustomizationpublic2013-09-27 03:53
ReporterM.Tuellmann Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.2.15 
Summary0016382: custom_strings_inc.php can crash RSS- Feed and mantisconnect with "XML declaration allowed only..."
Description

if custom_strings_inc.php contains a tab (ascii hex 9) after the closing tag "?>" this error occurs:

RSS- Feed
http://www.YourSite.com/mantis/issues_rss.php?username=JohnDoe&key=...
error on line 1 at column 6: XML declaration allowed only at the start of the document

Mantisconnect
http://www.YourSite.com/mantis/api/soap/mantisconnect.php?wsdl
error on line 1 at column 6: XML declaration allowed only at the start of the document

0012920 and 0010352 could also depend on this issue

TagsNo tags attached.

Relationships

related to 0012920 closedgrangeway RSS feed - XML parsing error 
related to 0010352 closedgrangeway RSS feed - XML Parsing Error 
related to 0012410 closedjreese Trailing content in plugin or core files destroys GraphViz graphs 

Activities

dregad

dregad

2013-09-17 17:51

developer   ~0038050

Last edited: 2013-09-17 17:55

It is your responsibility to ensure that your include files do not introduce whitespace.

I would also recommend not to add the closing '?>' tag as per [1]

The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include or require, so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

[1] http://php.net/manual/en/language.basic-syntax.instruction-separation.php