Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Htmlawed causing a fatal error on PHP 5.5.3 - preg_replace(): The /e modifier is deprecated

Hello,

I'm having troubles with Vanilla Forums 2.1b2. For some reason, when I view a discussion on the forum as a guest (not as a logged in user), it gives me a "Something has gone wrong" error, and when enabling debug in the config, it gives me this screen about a fatal error: https://gist.github.com/as-com/8185872#file-error1

I have tried to fix it by replacing line 382 with

$t = str_replace( // PHP 5.5 preg_replace_callback style
  array("\t", "\r", "\n", ' '), 
  '', 
  preg_replace_callback(
    '/"(?>(`.|[^"])*)"/sme',
    function($m) {
      return substr(str_replace(array(";", "|", "~", " ", ",", "/", "(", ")", '`"'), 
        array("\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\""),
        $m[0]), 1, -1);
    },
    trim($t)));

but then it prints out another error: https://gist.github.com/as-com/8185872#file-error2

Now I'm completely confused about how to fix this. Is there a way to fix it, or am I doing_it_wrong()?

Best Answers

Answers

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Can you please try this using php version 5.4 ?

Sign In or Register to comment.