diff options
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/discussion.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 1813c87aa..94d212ef6 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -218,13 +218,16 @@ function discussion_prepare_form_vars($topic = NULL) { if ($topic) { foreach (array_keys($values) as $field) { - $values[$field] = $topic->$field; + if (isset($topic->$field)) { + $values[$field] = $topic->$field; + } } } if (elgg_is_sticky_form('topic')) { - foreach (array_keys($values) as $field) { - $values[$field] = elgg_get_sticky_value('topic', $field); + $sticky_values = elgg_get_sticky_values('topic'); + foreach ($sticky_values as $key => $value) { + $values[$key] = $value; } } |