mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +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:
@@ -30,7 +30,7 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface
|
||||
|
||||
private ?\Closure $getEnv;
|
||||
|
||||
public function __construct(callable $serviceCompiler = null, \Closure $getEnv = null)
|
||||
public function __construct(?callable $serviceCompiler = null, ?\Closure $getEnv = null)
|
||||
{
|
||||
$this->serviceCompiler = null === $serviceCompiler ? null : $serviceCompiler(...);
|
||||
$this->getEnv = $getEnv;
|
||||
@@ -45,7 +45,7 @@ class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface
|
||||
|
||||
new ExpressionFunction('env', fn ($arg) => sprintf('$container->getEnv(%s)', $arg), function (array $variables, $value) {
|
||||
if (!$this->getEnv) {
|
||||
throw new LogicException('You need to pass a getEnv closure to the expression langage provider to use the "env" function.');
|
||||
throw new LogicException('You need to pass a getEnv closure to the expression language provider to use the "env" function.');
|
||||
}
|
||||
|
||||
return ($this->getEnv)($value);
|
||||
|
||||
Reference in New Issue
Block a user