diff --git a/inc/targetbase.class.php b/inc/targetbase.class.php index bc65674c3..7ab2169ee 100644 --- a/inc/targetbase.class.php +++ b/inc/targetbase.class.php @@ -237,7 +237,7 @@ protected function prepareActors(PluginFormcreatorForm $form, PluginFormcreatorF if ($answer->isNewItem()) { continue 2; } else { - $userIds = array_filter(explode(',', trim($answer->getField('answer')))); + $userIds = json_decode($answer->fields['answer'], JSON_OBJECT_AS_ARRAY); } $notify = $actor['use_notification']; break; @@ -274,7 +274,7 @@ protected function addActor($role, $user, $notify) { $userId = 0; $alternativeEmail = $user; } else { - $userId = intval($user); + $userId = (int) $user; $alternativeEmail = ''; if ($userId == '0') { // there is no actor