Skip to content

Commit

Permalink
Merge pull request #8 from iMi-digital/fix/tests
Browse files Browse the repository at this point in the history
Fix checking for urlsession middleware
  • Loading branch information
amenk committed Mar 26, 2021
2 parents c7d1061 + 44cab9f commit b6d04c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UrlGeneratorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class UrlGeneratorService extends UrlGenerator
public function addSid($url, ?\Illuminate\Routing\Route $route = null)
{
// Only apply transsid to routes/routegroups with the urlsession middleware.
if ($route === null || !in_array(UrlSession::class, $route->getAction('middleware'))) {
if ($route === null || !is_array($route->getAction('middleware')) || !in_array(UrlSession::class, $route->getAction('middleware'))) {
return $url;
}

Expand Down

0 comments on commit b6d04c5

Please sign in to comment.