From 605ace63c986ad45e7c77c3be8c03c5ddb7484be Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 11 Aug 2020 11:27:47 +0800 Subject: [PATCH] fix --- app/Model/UserRelationBind.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Model/UserRelationBind.php b/app/Model/UserRelationBind.php index 1265197..f14f029 100644 --- a/app/Model/UserRelationBind.php +++ b/app/Model/UserRelationBind.php @@ -28,7 +28,7 @@ class UserRelationBind extends Model public function setJsonDataAttribute($value) { - $this->attributes['json_data'] = json_encode(json_decode($value, true)); + $this->attributes['json_data'] = $value ? json_encode(json_decode($value, true)) : ''; } } \ No newline at end of file