Well, if you thought i couldn't get any weirder...
I couldn't find any BOMs in the database. But check this:
$d = array();
// Line A
$d['newslist'] = $modx->runSnippet('getNewsList', array( parentid => 99, lang => $lang, showDate => '' ));
// Line B
$d['jobreport'] = $modx->runSnippet('getJobreport', array( lang => $lang ));
// Line C ( same as line A )
// $d['newslist'] = $modx->runSnippet('getNewsList', array( parentid => 99, lang => $lang, showDate => '' ));
// CHECK FOR BOMS
$bom = pack("CCC", 0xef, 0xbb, 0xbf);
//check newslist for BOM
if (strstr($d['newslist'], $bom) !== false) {
$d['newslist'] = 'BOM'.$d['newslist'];
}
// check jobreport for BOM
if (strstr($d['jobreport'], $bom) !== false) {
$d['jobreport'] = 'BOM'.$d['jobreport'];
}
I call two snippets, in line A and B. After this call, $d['newslist'] contains a BOM. Strange thing is, when i check for the BOM *inside* the snippetcall 'getNewsList', immediately before the return-call, there is no BOM! So it somehow gets added in the above script.
To make it even stranger, when i uncomment Line C, in effect the same as Line A, everything is fine.
And when i comment out Line A or A+C, the BOM now appears in $d['jobreport'], called from Line B.
I don't even expect you to follow through all of this, it just makes no sense, at least to me.
I think i'll just search and replace the BOMs in the final output. It's not pretty, but i already spent too much time on this...
Thanks for watching, good night.