From ceaf9e7d6a47e2e898d548c09a7ab032ddc89a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 4 Apr 2016 21:19:32 +0200 Subject: [PATCH] FIX: fix saving new column type for content --- app/Models/Content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Content.php b/app/Models/Content.php index 300d1eec..18350112 100644 --- a/app/Models/Content.php +++ b/app/Models/Content.php @@ -175,7 +175,7 @@ class Content extends Model if (!in_array($fieldDB, $this->fillable)) { // this field is not part of "core" content - probably it will be module settings $commonField = false; - $fieldValue = $this->module_settings->$fieldDB; + $fieldValue = isset($this->module_settings->$fieldDB) ? $this->module_settings->$fieldDB : null; } else { $commonField = true; $fieldValue = $this->$fieldDB;