Skip to content

Commit

Permalink
Merge pull request #1803 from metacpan/oalders/silence-concat-warning
Browse files Browse the repository at this point in the history
Silence a warning that happens when a user possibly has a cookie but …
  • Loading branch information
ranguard committed Nov 19, 2016
2 parents e25a01a + e2eaa8d commit 2e10399
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/MetaCPAN/Web/Controller/Account/Favorite.pm
Expand Up @@ -8,6 +8,13 @@ sub auto : Private {

# Needed to clear the cache
my $user = $c->model('API::User')->get_profile( $c->token )->recv;

# Probably we shouldn't be getting to this point without a defined user,
# but sometimes we do. Might have been an issue with the v0 => v1
# migration.

$c->detach('/forbidden') unless $user;

$c->stash->{user} = $user;

return 1;
Expand Down

0 comments on commit 2e10399

Please sign in to comment.