From f7b596b2d27c048df50b9e1b772e7c4aae55be9f Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 23 Nov 2010 02:47:07 +0000 Subject: returning an empty array when there are no widgets for a context git-svn-id: http://code.elgg.org/elgg/trunk@7426 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php index cf73f664c..f4cb8765b 100644 --- a/engine/lib/widgets.php +++ b/engine/lib/widgets.php @@ -17,7 +17,7 @@ * @param int $user_guid The owner user GUID * @param string $context The context (profile, dashboard, etc) * - * @return array|false An 2D array of ElggWidget objects or false + * @return array An 2D array of ElggWidget objects * @since 1.8.0 */ function elgg_get_widgets($user_guid, $context) { @@ -30,7 +30,7 @@ function elgg_get_widgets($user_guid, $context) { ); $widgets = elgg_get_entities_from_private_settings($options); if (!$widgets) { - return false; + return array(); } $sorted_widgets = array(); -- cgit v1.2.3