Subscribe: RSS
  • (ERROR @ /var/www/html/ui/core/components/discuss/model/discuss/parser/disbbcodeparser.class.php : 623) PHP warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead



    $parts[$i] = preg_replace('~\[([/]?)(list|li)((\s[^\]]+)*)\]~ie', '\'[$1\' . strtolower(\'$2\') . \'$3]\'', $parts[$i]);

    if replaced it with

    $parts[$i] = preg_replace_callback('~\[([/]?)(list|li)((\s[^\]]+)*)\]~i', function($matches) {
    return $matches[0]. strtolower($matches[1]) . $matches[2];
    } , $parts[$i]);

    The error seems to be fixed, but I'm not sure whether this solution is ok, or not?

    [ed. note: falko301 last edited this post 1 year, 9 months ago.]