From 3303b435ad90889e9ba666562b51c6bff355ee72 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 30 Jul 2018 12:05:28 +0800 Subject: [PATCH] add reset --- var/Widget/Comments/Archive.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/var/Widget/Comments/Archive.php b/var/Widget/Comments/Archive.php index 40ae69ec..f5219337 100644 --- a/var/Widget/Comments/Archive.php +++ b/var/Widget/Comments/Archive.php @@ -283,9 +283,7 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments /** 评论置位 */ $this->length = count($this->stack); - if (0 !== $this->length) { - $this->row = current($this->stack); - } + $this->row = $this->length > 0 ? current($this->stack) : array(); } reset($this->stack);