Browse Source

MineTag fix

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

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

20
   public function getTagOrderForDiffusions(User $user)
20
   public function getTagOrderForDiffusions(User $user)
21
   {
21
   {
22
     $user_tags = $this->getUserTagsTags($user, 'element_diffusion_tags');
22
     $user_tags = $this->getUserTagsTags($user, 'element_diffusion_tags');
23
-    
24
-   if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))
25
-     return $tags_ordereds;
26
-   
27
-   return array();
23
+    $user_tags = null;
24
+    if ($user_tags)
25
+    {
26
+      if (count($tags_ordereds = $user_tags->getElementDiffusionTags()))
27
+      {
28
+        return $tags_ordereds;
29
+      }
30
+    }
31
+    return array();
28
   }
32
   }
29
   
33
   
30
   protected function getUserTagsTags(User $user, $field)
34
   protected function getUserTagsTags(User $user, $field)