aboutsummaryrefslogtreecommitdiff
path: root/mod/file/lib/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/lib/file.php')
-rw-r--r--mod/file/lib/file.php9
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;
}
}