Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP error when using detect_emoticons() #18

Open
cyphix333 opened this issue Mar 3, 2015 · 1 comment
Open

PHP error when using detect_emoticons() #18

cyphix333 opened this issue Mar 3, 2015 · 1 comment

Comments

@cyphix333
Copy link

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
@cyphix333
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant