diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-04 13:23:25 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-04 13:23:25 +0000 |
commit | 3b384b7374fd44795d3ceb7c434630d1b4695750 (patch) | |
tree | 48d5e8dd8f1754646f85858d82db744483135e03 /engine/lib/entities.php | |
parent | d90262f965c85c86d36944ff31754abf850512a7 (diff) | |
download | elgg-3b384b7374fd44795d3ceb7c434630d1b4695750.tar.gz elgg-3b384b7374fd44795d3ceb7c434630d1b4695750.tar.bz2 |
Added better support for arrays of metadata
git-svn-id: https://code.elgg.org/elgg/trunk@402 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index e344968a9..92b658ef2 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -117,8 +117,11 @@ { $md = get_metadata_byname($this->getGUID(), $name); - if ($md) - return $md->value; + if ($md && !is_array($md)) { + return $md->value;
+ } else if ($md && is_array($md)) {
+ return metadata_array_to_values($md);
+ } return null; } |