Skip to content

Commit

Permalink
fixed: check for array when saving settings
Browse files Browse the repository at this point in the history
fixes #124
  • Loading branch information
jdalsem committed Sep 28, 2021
1 parent b5bfe78 commit add6326
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion classes/ColdTrick/WidgetManager/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public static function implodeSettings(\Elgg\Hook $hook) {
return;
}

return implode(',', $hook->getValue());
$current_value = $hook->getValue();
if (!is_array($current_value)) {
return;
}

return implode(',', $current_value);
}
}

0 comments on commit add6326

Please sign in to comment.