严格标准:仅应在/home/zumpu/public_html/cats/cats-0.8.0/lib/DataGrid.php 第 1519 行中通过引用传递变量
严格标准:仅应在/home/zumpu/public_html/cats/cats-0.8.0/lib/DataGrid.php 第 1535 行中通过引用传递变量
if ($sizable)
{
$formatString = '<th align="left" class="resizeableCell" '
. 'style="width:5px; border-collapse: collapse; '
. '-moz-user-select: none; -khtml-user-select: none;';
if (end(array_keys($this->_currentColumns)) != $index) //line 1519
{
//Uncomment for gray resize bars
$formatString .= 'border-right:1px solid gray;';
}
$formatString .=
'user-select: none;" onmouseover="style.cursor = '
. '\'e-resize\'" onmousedown="startResize(\'cell%s%s\', '
. '\'table%s\', \'cell%s%s\', %s, \'%s\', \'%s\', '
. '\'%s\', \'%s\', this.offsetWidth);">';
echo sprintf(
$formatString,
$md5InstanceName, $index,
$md5InstanceName,
$md5InstanceName, end(array_keys($this->_currentColumns)),// line 1535
$this->_tableWidth,
urlencode($this->_instanceName),
$_SESSION['CATS']->getCookie(),
$data['name'],
implode(',', $cellIndexes)
);
echo '<div class="dataGridResizeAreaInnerDiv"></div></th>', "\n";
}
}
帮帮我,我被困了两天
最佳答案
严格来说,您不应该将函数的返回值直接传递给另一个将其参数作为引用的函数,而无需先将其分配给命名变量。
无论如何,它通常都可以工作,并且可能不会中断,[直到 PHP 版本更改破坏它],但由于这些原因,它会生成 E_STRICT
消息。
这应该删除该消息,但保留当前功能:
$keys = array_keys($this->_currentColumns);
if (end($keys)) != $index) //line 1519
/* ... */
echo sprintf(
$formatString,
$md5InstanceName, $index,
$md5InstanceName,
$md5InstanceName, end($keys),// line 1535
$this->_tableWidth,
urlencode($this->_instanceName),
$_SESSION['CATS']->getCookie(),
$data['name'],
implode(',', $cellIndexes)
);
关于php - 严格标准 :Only variables should be passed by reference is,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22700749/