mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
fix expression provider for exists
This commit is contained in:
parent
aac464704e
commit
ce4f5baaaa
1 changed files with 4 additions and 4 deletions
|
@ -27,14 +27,14 @@ class ExpressionProvider implements ExpressionFunctionProviderInterface
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
//Exists must be personnalized because it inverse is_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)
|
}, function ($arguments, $var)
|
||||||
{
|
{
|
||||||
return null !== $var;
|
return isset($var);
|
||||||
});
|
});
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue