Browse Source

fix MineTag agagin

Bastien Sevajol 11 years ago
parent
commit
54c608af1c
1 changed files with 9 additions and 4 deletions
  1. 9 4
      src/Muzich/CoreBundle/Mining/Tag/TagData.php

+ 9 - 4
src/Muzich/CoreBundle/Mining/Tag/TagData.php View File

@@ -11,16 +11,21 @@ class TagData extends Base
11 11
   {
12 12
     $user_tags = $this->getUserTagsTags($user, 'element_favorite_tags');
13 13
     
14
-   if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
15
-     return $tags_ordereds;
16
-   
14
+    if ($user_tags)
15
+    {
16
+      if (count($tags_ordereds = $user_tags->getElementFavoriteTags()))
17
+      {
18
+        return $tags_ordereds;
19
+      }
20
+    }
21
+    
17 22
    return array();
18 23
   }
19 24
   
20 25
   public function getTagOrderForDiffusions(User $user)
21 26
   {
22 27
     $user_tags = $this->getUserTagsTags($user, 'element_diffusion_tags');
23
-    $user_tags = null;
28
+    
24 29
     if ($user_tags)
25 30
     {
26 31
       if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))