diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-09-05 14:17:44 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-09-05 14:17:44 +0200 |
commit | 5173fd1c3d05d1fadfbdd4db862cd744209e13ac (patch) | |
tree | a0c677965b717e1b83446a9796df5e19465a8bd1 /src | |
parent | a1d22ea7d0cc8c51ca5480aa41488f2c6373f1a3 (diff) | |
download | wallabag-5173fd1c3d05d1fadfbdd4db862cd744209e13ac.tar.gz wallabag-5173fd1c3d05d1fadfbdd4db862cd744209e13ac.tar.zst wallabag-5173fd1c3d05d1fadfbdd4db862cd744209e13ac.zip |
Returned 0 instead of returning empty array for Twig Extension
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Twig/WallabagExtension.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index 59eb57ec..3780b13e 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php | |||
@@ -54,7 +54,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa | |||
54 | $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null; | 54 | $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null; |
55 | 55 | ||
56 | if (null === $user || !is_object($user)) { | 56 | if (null === $user || !is_object($user)) { |
57 | return []; | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | switch ($type) { | 60 | switch ($type) { |
@@ -101,7 +101,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa | |||
101 | $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null; | 101 | $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null; |
102 | 102 | ||
103 | if (null === $user || !is_object($user)) { | 103 | if (null === $user || !is_object($user)) { |
104 | return []; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | $qb = $this->tagRepository->findAllTags($user->getId()); | 107 | $qb = $this->tagRepository->findAllTags($user->getId()); |