syntax highlighter bug

This forum is for discussing the future of the PHP Developer's Network, as well as for us to get your opinion on things.

This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
PHPHorizons
Forum Contributor
Posts: 175
Joined: Mon Sep 14, 2009 11:38 pm

syntax highlighter bug

Post 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
Post Reply