]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
returning an empty array when there are no widgets for a context
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 23 Nov 2010 02:47:07 +0000 (02:47 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 23 Nov 2010 02:47:07 +0000 (02:47 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7426 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/widgets.php

index cf73f664cc7c433e5fd48fbab5b1388edfe3bb82..f4cb8765bc447c6133a0f7bdaeb29fd13ebb387d 100644 (file)
@@ -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();