]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/TagController.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / TagController.php
index 707f3bbe3ea152a45964189baaf5f5ba313fbbfb..a3e70fd0aeabf2661d15560b1e40142836fd2357 100644 (file)
@@ -90,15 +90,15 @@ class TagController extends Controller
 
         $flatTags = [];
 
-        foreach ($tags as $key => $tag) {
+        foreach ($tags as $tag) {
             $nbEntries = $this->getDoctrine()
                 ->getRepository('WallabagCoreBundle:Entry')
-                ->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag['id']);
+                ->countAllEntriesByUserIdAndTagId($this->getUser()->getId(), $tag->getId());
 
             $flatTags[] = [
-                'id' => $tag['id'],
-                'label' => $tag['label'],
-                'slug' => $tag['slug'],
+                'id' => $tag->getId(),
+                'label' => $tag->getLabel(),
+                'slug' => $tag->getSlug(),
                 'nbEntries' => $nbEntries,
             ];
         }