<![CDATA[ dicuss with php 7 .. - My Forums]]> https://forums.modx.com/thread/?thread=101974 <![CDATA[dicuss with php 7 ..]]> https://forums.modx.com/thread/101974/dicuss-with-php-7#dis-post-549774


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

]]>
falko301 Mar 30, 2017, 07:18 AM https://forums.modx.com/thread/101974/dicuss-with-php-7#dis-post-549774