SBBCodeParser
SBBCodeParser copied to clipboard
PHP error when using detect_emoticons()
I have noticed that whilst this works:
echo $parser->parse(file_get_contents('data.txt'))
->detect_links()
->get_html();
This however produces an error:
echo $parser->parse(file_get_contents('data.txt'))
->detect_links()
->detect_emoticons()
->get_html();
This is the error I get whenever I try and use "detect_emoticons()"..
Warning: preg_match_all(): No ending delimiter ')' found in D:\***********\bbcode\classes\Node\Container\Document.php on line 1009
Update: I have noticed it only does it if you have no emoticons added via something like:
$parser->add_emoticons(array(
':)' => 'http://localhost/Classes/SCEditor-punbb/punbb-1.3.5/img/smilies/smile.png',
'=)' => 'http://localhost/Classes/SCEditor-punbb/punbb-1.3.5/img/smilies/smile.png'
));
...and you try and use it. As long as you add emoticons as above then it will work.