修正错误的数据堆栈
在没有评论且开启评论分页的情况下,$this->row 会被错误地赋值为 false,在之后通过魔术方法 __get 获取内部变量时会抛出警告 Warning: array_key_exists() expects parameter 2 to be array, boolean given
This commit is contained in:
@@ -282,7 +282,8 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
($this->_currentPage - 1) * $this->options->commentsPageSize, $this->options->commentsPageSize);
|
||||
|
||||
/** 评论置位 */
|
||||
$this->row = current($this->stack);
|
||||
if ($this->_total !== 0)
|
||||
$this->row = current($this->stack);
|
||||
$this->length = count($this->stack);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user