Page 1 of 1

syntax highlighter bug

Posted: Tue Jun 15, 2010 11:49 pm
by PHPHorizons
I wasn't sure how to specify javascript syntax, so I put syntax=js into the bbcode and got the following error:

[phpBB Debug] PHP Notice: in file /includes/geshi.php on line 3355: preg_replace() [function.preg-replace]: Unknown modifier '.'
[phpBB Debug] PHP Notice: in file /includes/geshi.php on line 3355: preg_replace() [function.preg-replace]: Unknown modifier '.'

The code below will be able to reproduce the error if you change syntax=javascript to syntax=js

Code: Select all

var someDivElement = document.getElementById('someDivElement');
foreach (var x in flashObject) {
if (flashObject.hasOwnProperty(x)) {
 someDivElement.innerHTML += flashObject[x];
}
}
Cheers