fix expression provider for exists

This commit is contained in:
osaajani 2021-01-14 03:52:54 +01:00
parent aac464704e
commit ce4f5baaaa

View file

@ -29,12 +29,12 @@ class ExpressionProvider implements ExpressionFunctionProviderInterface
});
//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 [