严格标准:在第742行的Smarty_Compiler.class.php中,只能通过引用传递变量

严格标准:在第742行的Smarty_Compiler.class.php中,只能通过引用传递变量,php,Php,我从下载了一个实时聊天插件。当我尝试与我的系统集成时,我面临的问题是“严格的标准:只有变量应该在第742行的Smarty_Compiler.class.php中通过引用传递”。有谁能指导我如何更改742行,使此错误不会显示 <?php function _compile_custom_tag($tag_command, $tag_args, $tag_modifier) { $this->_add_plugin('function', $tag_command);

我从下载了一个实时聊天插件。当我尝试与我的系统集成时,我面临的问题是“严格的标准:只有变量应该在第742行的Smarty_Compiler.class.php中通过引用传递”。有谁能指导我如何更改742行,使此错误不会显示

<?php    
function _compile_custom_tag($tag_command, $tag_args, $tag_modifier)
{
    $this->_add_plugin('function', $tag_command);

    $_cacheable_state = $this->_push_cacheable_state('function', $tag_command);
    $attrs = $this->_parse_attrs($tag_args);
    $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs=''); //line 742

    $_return = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)";
    if($tag_modifier != '') {
        $this->_parse_modifiers($_return, $tag_modifier);
    }

    if($_return != '') {
        $_return =  '<?php ' . $_cacheable_state . $_cache_attrs . 'echo ' . $_return . ';'
            . $this->_pop_cacheable_state('function', $tag_command) . "?>" . $this->_additional_newline;
    }

    return $_return;
}
?>

下面是_compile_arg_list函数

<?php
function _compile_arg_list($type, $name, $attrs, &$cache_code) {
    $arg_list = array();

    if (isset($type) && isset($name)
        && isset($this->_plugins[$type])
        && isset($this->_plugins[$type][$name])
        && empty($this->_plugins[$type][$name][4])
        && is_array($this->_plugins[$type][$name][5])
        ) {
        /* we have a list of parameters that should be cached */
        $_cache_attrs = $this->_plugins[$type][$name][5];
        $_count = $this->_cache_attrs_count++;
        $cache_code = "\$_cache_attrs =& \$this->_smarty_cache_attrs('$this->_cache_serial','$_count');";

    } else {
        /* no parameters are cached */
        $_cache_attrs = null;
    }

    foreach ($attrs as $arg_name => $arg_value) {
        if (is_bool($arg_value))
            $arg_value = $arg_value ? 'true' : 'false';
        if (is_null($arg_value))
            $arg_value = 'null';
        if ($_cache_attrs && in_array($arg_name, $_cache_attrs)) {
            $arg_list[] = "'$arg_name' => (\$this->_cache_including) ? \$_cache_attrs['$arg_name'] : (\$_cache_attrs['$arg_name']=$arg_value)";
        } else {
            $arg_list[] = "'$arg_name' => $arg_value";
        }
    }
    return $arg_list;
}
?>
将行更改为:

$_cache_attrs = '';
$arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs);
不能对通过引用传递的参数使用赋值表达式,必须提供可更新的变量。

将行更改为:

$_cache_attrs = '';
$arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs);

您不能对通过引用传递的参数使用赋值表达式,您必须提供一个可以更新的变量。

什么是
\u compile\u arg\u list
方法的签名?什么是
\u compile\u arg\u list
方法的签名?什么是
\u compile\u arg\u list
方法的签名?什么可能重复