From 3b384b7374fd44795d3ceb7c434630d1b4695750 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 4 Apr 2008 13:23:25 +0000 Subject: Added better support for arrays of metadata git-svn-id: https://code.elgg.org/elgg/trunk@402 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engine/lib/entities.php') 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; } -- cgit v1.2.3