From 03f508d642ded46975a8719db9406876d316d90b Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 24 Nov 2009 01:53:48 +0000 Subject: entities can now have metadata of 0 and return the correct type. Fixes #1192 git-svn-id: http://code.elgg.org/elgg/trunk@3705 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'engine') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 1ac8b37bb..df8cc2f7f 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -143,12 +143,9 @@ abstract class ElggEntity implements // No, so see if its in the meta data for this entity $meta = $this->getMetaData($name); - if ($meta) { - return $meta; - } - - // Can't find it, so return null - return null; + + // getMetaData returns NULL if $name is not found + return $meta; } /** -- cgit v1.2.3