diff --git a/ExpressionLanguage/ExpressionFunction/GraphQL/IsTypeOf.php b/ExpressionLanguage/ExpressionFunction/GraphQL/IsTypeOf.php index d812911bf..45717a96b 100644 --- a/ExpressionLanguage/ExpressionFunction/GraphQL/IsTypeOf.php +++ b/ExpressionLanguage/ExpressionFunction/GraphQL/IsTypeOf.php @@ -11,7 +11,7 @@ public function __construct($name = 'isTypeOf') parent::__construct( $name, function ($className) { - return sprintf('($className = %s) && $value instanceof $className', $className); + return sprintf('(($className = %s) && $value instanceof $className)', $className); } ); } diff --git a/ExpressionLanguage/ExpressionFunction/Security/IsAuthenticated.php b/ExpressionLanguage/ExpressionFunction/Security/IsAuthenticated.php index d222e7949..615a3d922 100644 --- a/ExpressionLanguage/ExpressionFunction/Security/IsAuthenticated.php +++ b/ExpressionLanguage/ExpressionFunction/Security/IsAuthenticated.php @@ -11,7 +11,7 @@ public function __construct($name = 'isAuthenticated') parent::__construct( $name, function () { - return '$container->get(\'security.authorization_checker\')->isGranted(\'IS_AUTHENTICATED_REMEMBERED\') || $container->get(\'security.authorization_checker\')->isGranted(\'IS_AUTHENTICATED_FULLY\')'; + return '($container->get(\'security.authorization_checker\')->isGranted(\'IS_AUTHENTICATED_REMEMBERED\') || $container->get(\'security.authorization_checker\')->isGranted(\'IS_AUTHENTICATED_FULLY\'))'; } ); }