summaryrefslogtreecommitdiffstats
path: root/Http/Firewall
diff options
context:
space:
mode:
Diffstat (limited to 'Http/Firewall')
-rw-r--r--Http/Firewall/ExceptionListener.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 2804d0e..98f5ac0 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -203,7 +203,15 @@ class ExceptionListener
}
}
- return $this->authenticationEntryPoint->start($request, $authException);
+ $response = $this->authenticationEntryPoint->start($request, $authException);
+
+ if (!$response instanceof Response) {
+ $given = is_object($response) ? get_class($response) : gettype($response);
+
+ throw new \LogicException(sprintf('The %s::start() method must return a Response object (%s returned)', get_class($this->authenticationEntryPoint), $given));
+ }
+
+ return $response;
}
/**