We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c97e4e commit b9b0a85Copy full SHA for b9b0a85
1 file changed
Twig/Extension.php
@@ -34,7 +34,9 @@ public function __construct(
34
string $domain
35
) {
36
$this->intuition = $intuition;
37
- $this->session = $requestStack->getSession();
+ if ($requestStack->getCurrentRequest() && $requestStack->getCurrentRequest()->hasSession()) {
38
+ $this->session = $requestStack->getCurrentRequest()->getSession();
39
+ }
40
$this->domain = $domain;
41
}
42
0 commit comments