diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-26 13:11:23 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-26 13:11:23 +0000 |
commit | 962164b97ca11d9ce155bde60f198d226ff060d3 (patch) | |
tree | 84dd5d6f7979a8c4e6efa08dd32c60b9bedffc27 /mod/file | |
parent | 83658fe7fe28332e73ca6600793ddb8bb52f5b3a (diff) | |
download | elgg-962164b97ca11d9ce155bde60f198d226ff060d3.tar.gz elgg-962164b97ca11d9ce155bde60f198d226ff060d3.tar.bz2 |
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
Diffstat (limited to 'mod/file')
-rw-r--r-- | mod/file/lib/file.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/file/lib/file.php b/mod/file/lib/file.php index 6ca49e95b..6f94772e7 100644 --- a/mod/file/lib/file.php +++ b/mod/file/lib/file.php @@ -26,13 +26,16 @@ function file_prepare_form_vars($file = null) { if ($file) { foreach (array_keys($values) as $field) { - $values[$field] = $file->$field; + if (isset($file->$field)) { + $values[$field] = $file->$field; + } } } if (elgg_is_sticky_form('file')) { - foreach (array_keys($values) as $field) { - $values[$field] = elgg_get_sticky_value('file', $field); + $sticky_values = elgg_get_sticky_values('file'); + foreach ($sticky_values as $key => $value) { + $values[$key] = $value; } } |