Skip to content

Commit 0c83da0

Browse files
committed
fix(actorfield): edition problem when switching question type from dromdown / object
1 parent d321c4d commit 0c83da0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/field/actorfield.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,13 @@ public function serializeValue(): string {
163163

164164
public function deserializeValue($value) {
165165
$deserialized = [];
166+
166167
$serialized = ($value !== null && $value !== '')
167168
? json_decode($value, JSON_OBJECT_AS_ARRAY)
168169
: [];
170+
if (!is_array($serialized)) {
171+
$serialized = [];
172+
}
169173
foreach ($serialized as $item) {
170174
$item = trim($item);
171175
if (filter_var($item, FILTER_VALIDATE_EMAIL) !== false) {

0 commit comments

Comments
 (0)