fix expression provider for exists

This commit is contained in:
osaajani 2021-01-14 03:52:54 +01:00
parent aac464704e
commit ce4f5baaaa
1 changed files with 4 additions and 4 deletions

View File

@ -27,14 +27,14 @@ class ExpressionProvider implements ExpressionFunctionProviderInterface
{
return null;
});
//Exists must be personnalized because it inverse is_null
$exists = new ExpressionFunction('exists', function ($var)
$exists = new ExpressionFunction('exists', function ($str)
{
return sprintf('!is_null(%1$s)', $str);
return sprintf('isset(%1$s)', $str);
}, function ($arguments, $var)
{
return null !== $var;
return isset($var);
});
return [