mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01:00
Returned 0 instead of returning empty array for Twig Extension
This commit is contained in:
parent
a1d22ea7d0
commit
5173fd1c3d
@ -54,7 +54,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
|
|||||||
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
|
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
|
||||||
|
|
||||||
if (null === $user || !is_object($user)) {
|
if (null === $user || !is_object($user)) {
|
||||||
return [];
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
@ -101,7 +101,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
|
|||||||
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
|
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
|
||||||
|
|
||||||
if (null === $user || !is_object($user)) {
|
if (null === $user || !is_object($user)) {
|
||||||
return [];
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$qb = $this->tagRepository->findAllTags($user->getId());
|
$qb = $this->tagRepository->findAllTags($user->getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user