Skip to content

php 7 .. another error #42

Description

@mfalkenhahn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions