Discuss icon indicating copy to clipboard operation
Discuss copied to clipboard

php 7 .. another error

Open mfalkenhahn opened this issue 7 years ago • 0 comments

(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?

mfalkenhahn avatar Mar 30 '17 08:03 mfalkenhahn