-
Notifications
You must be signed in to change notification settings - Fork 45
TokenMismatchException #202
Comments
Which page(s) does this apply to?
|
@euantorano quick reply, or reply page |
@euantorano now its showing strtr(): The second argument is not an array As i'm new to PHP and Laravel(even more), I fail to fix this edit: New code:
$emptyVar = "" ;
$message = strtr($message, $smilies, $emptyVar);
edit:
$message = strtr($message, $smilies, $smilies);
Still have no idea what im doing It's working fine now. |
Interesting. The parser is going to get a major overhaul soon which will resolve that second issue. I'll look into the CSRF token.
|
@euantorano is this a good fix? {
...
# Array smilies
$smilies[] = $this->smileys->getParseableSmileys();
if (empty($smilies)) {
return $message;
}
// TODO: this is mycode but it's not the parser! Should be changed as we plan to also support markdown
// First we take out any of the tags we don't want parsed between (url= etc)
preg_match_all(
"#\[(url(=[^\]]*)?\]|quote=([^\]]*)?\])|(http|ftp)(s|)://[^\s]*#i",
$message,
$bad_matches,
PREG_PATTERN_ORDER
);
if (count($bad_matches[0]) > 0) {
$message = preg_replace(
"#\[(url(=[^\]]*)?\]|quote=([^\]]*)?\])|(http|ftp)(s|)://[^\s]*#si",
"<mybb-bad-sm>",
$message
);
}
$message = strtr($message, $smilies);
...
} It works. |
@Hackmastr yes, that should work I think, but the parser is going to get a major overhaul to make use of https://github.com/s9e/TextFormatter - which includes smileys and everything already 😄 I just need to (eventually) find the time to make the change. |
Running mybb 2.0 with Laravel 5.2 gives the error:
Apparently Laravel requieres
The text was updated successfully, but these errors were encountered: