From bfd286ab18b07447ce4c36a2389240f44e4f2780 Mon Sep 17 00:00:00 2001 From: krisawzm Date: Sun, 7 Jun 2015 22:00:16 +0200 Subject: [PATCH] Fixes #1194 Repeater form fields store arrays and must be jsonable. --- modules/cms/models/ThemeData.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/cms/models/ThemeData.php b/modules/cms/models/ThemeData.php index 941305405..c03af4dc5 100644 --- a/modules/cms/models/ThemeData.php +++ b/modules/cms/models/ThemeData.php @@ -74,6 +74,15 @@ class ThemeData extends Model public function afterFetch() { + /* + * Repeater form fields store arrays and must be jsonable. + */ + foreach ($this->getFormFields() as $id => $field) { + if (isset($field['type']) && $field['type'] == 'repeater') { + $this->jsonable[] = $id; + } + } + /* * Fill this model with the jsonable attributes kept in 'data'. */