未运行DLE 10.6+;PHP7在check_module()中调用preg_replace_回调?

未运行DLE 10.6+;PHP7在check_module()中调用preg_replace_回调?,php,regex,php-7,preg-replace-callback,Php,Regex,Php 7,Preg Replace Callback,我将DLE 10.6转换为PHP7,看到一个空白页面。在调试过程中,我发现如果我从main.tpl网站中删除[not aviable=smth]smth[/not aviable],那么这个网站就会开始工作。好的,我在templates.class.php方法check_模块中发现: function check_module($matches) { global $dle_module; $regex = '/\[(aviable|available|not-aviable|

我将DLE 10.6转换为PHP7,看到一个空白页面。在调试过程中,我发现如果我从main.tpl网站中删除[not aviable=smth]smth[/not aviable],那么这个网站就会开始工作。好的,我在templates.class.php方法check_模块中发现:

function check_module($matches) {
    global $dle_module;

    $regex = '/\[(aviable|available|not-aviable|not-available)=(.+?)\]((?>(?R)|.)*?)\[\/\1\]/is';

    if (is_array($matches)) {

        $aviable = $matches[2];
        $block = $matches[3];

        if ($matches[1] == "aviable" OR $matches[1] == "available") $action = true; else $action = false;

        $aviable = explode( '|', $aviable );

        if( $action ) {

            if( ! (in_array( $dle_module, $aviable )) and ($aviable[0] != "global") ) $matches = '';
            else $matches = $block;

        } else {

            if( (in_array( $dle_module, $aviable )) ) $matches = '';
            else $matches = $block;
        }       

    }

    return preg_replace_callback($regex, array( &$this, 'check_module'), $matches);
}
当我从$regex中删除“不可用:时,网站开始工作。
php.ini包含pcre.backtrack_limit=1000000和什么是中间smth?html代码或文本。aviable包含相同且工作完美的[aviable=smth]smth[/aviable],通过询问什么是……我的意思是确切的。请在您的问题中加入一个真实世界的示例。[not aviable=sportivnie podborki filmov |常见问题解答]{content[/not aviable][aviable=showfull][not aviable]什么是中间smth?html代码或文本。aviable包含相同且工作完美的[aviable=smth]smth[/aviable],通过询问什么是……我的确切意思。请在您的问题中加入一个真实世界的示例。[not aviable=sportivnie podborki filmov | faq]{content}[/not aviable][not aviable=showfull][/不可飞行]