Skip to content

Commit

Permalink
Add null check for admin session user
Browse files Browse the repository at this point in the history
  • Loading branch information
quangdo-aligent committed Mar 25, 2020
1 parent 207a449 commit 61f847e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,16 @@ protected function getCategoriesTree($filter = null)
* @param string $filter
* @return string
*/
private function getCategoriesTreeCacheId(int $storeId, string $filter = '') : string
private function getCategoriesTreeCacheId(int $storeId, string $filter = ''): string
{
if ($this->session->getUser() !== null) {
return self::CATEGORY_TREE_ID
. '_' . (string)$storeId
. '_' . $this->session->getUser()->getAclRole()
. '_' . $filter;
}
return self::CATEGORY_TREE_ID
. '_' . (string) $storeId
. '_' . $this->session->getUser()->getAclRole()
. '_' . (string)$storeId
. '_' . $filter;
}

Expand Down

0 comments on commit 61f847e

Please sign in to comment.