From 4e69f1b43e8f7762a44f9c453782312648206c04 Mon Sep 17 00:00:00 2001 From: koogua Date: Tue, 23 Mar 2021 10:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3chapter=20attrs=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=BA=8F=E5=88=97=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Chapter.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Models/Chapter.php b/app/Models/Chapter.php index 9e59f89e..c8a772b3 100644 --- a/app/Models/Chapter.php +++ b/app/Models/Chapter.php @@ -214,9 +214,10 @@ class Chapter extends Model $this->attrs = $this->_read_attrs; } } - if (is_array($this->attrs)) { - $this->attrs = kg_json_encode($this->attrs); - } + } + + if (is_array($this->attrs)) { + $this->attrs = kg_json_encode($this->attrs); } $this->create_time = time();