From 962164b97ca11d9ce155bde60f198d226ff060d3 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 26 Mar 2011 13:11:23 +0000 Subject: Fixes #3239 entities aren't blown away in form prepare functions any more git-svn-id: http://code.elgg.org/elgg/trunk@8839 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/lib/discussion.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mod/groups/lib') 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; } } -- cgit v1.2.3