mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
N°8017 - Security - dependabot - Symfony's VarDumper vulnerable to un… (#731)
Upgrade all Symfony components to last security fix (~6.4.0)
This commit is contained in:
@@ -25,7 +25,7 @@ class TemplateController
|
||||
{
|
||||
private ?Environment $twig;
|
||||
|
||||
public function __construct(Environment $twig = null)
|
||||
public function __construct(?Environment $twig = null)
|
||||
{
|
||||
$this->twig = $twig;
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class TemplateController
|
||||
* @param array $context The context (arguments) of the template
|
||||
* @param int $statusCode The HTTP status code to return with the response (200 "OK" by default)
|
||||
*/
|
||||
public function templateAction(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response
|
||||
public function templateAction(string $template, ?int $maxAge = null, ?int $sharedAge = null, ?bool $private = null, array $context = [], int $statusCode = 200): Response
|
||||
{
|
||||
if (null === $this->twig) {
|
||||
throw new \LogicException('You cannot use the TemplateController if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
|
||||
@@ -68,7 +68,7 @@ class TemplateController
|
||||
/**
|
||||
* @param int $statusCode The HTTP status code (200 "OK" by default)
|
||||
*/
|
||||
public function __invoke(string $template, int $maxAge = null, int $sharedAge = null, bool $private = null, array $context = [], int $statusCode = 200): Response
|
||||
public function __invoke(string $template, ?int $maxAge = null, ?int $sharedAge = null, ?bool $private = null, array $context = [], int $statusCode = 200): Response
|
||||
{
|
||||
return $this->templateAction($template, $maxAge, $sharedAge, $private, $context, $statusCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user