Steps to reproduce: 1. Create schema and some field with Input object argument ``` input MsgInput { msg: String } type Query { echo(msg: MsgInput): String } schema { query: Query } ``` 2. Make query and pass input argument through variable as array ``` {"query":"query echo ($msg: MsgInput) {\n echo (msg: $msg)\n}","variables":{"msg":["my message"]},"operationName":null} ``` Expected correct response with error: ```Variable \"$msg\" got invalid value [\"my message\"]; Field \"0\" is not defined by type MsgInput.``` Actual result: ``` Fatal error: Uncaught TypeError: mb_strlen() expects parameter 1 to be string, int given in /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Utils/Utils.php:627 Stack trace: #0 /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Utils/Utils.php(627): mb_strlen(0) #1 /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Utils/Value.php(203): GraphQL\Utils\Utils::suggestionList(0, Array) #2 /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Executor/Values.php(61): GraphQL\Utils\Value::coerceValue(Array, Object(GraphQL\Type\Definition\InputObjectType), Object(GraphQL\Language\AST\VariableDefinitionNode)) #3 /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php(172): GraphQL\Executor\Values::getVariableValues(Object(GraphQL\Type\Schema), Object(GraphQL\Language\AST\NodeList), Array) #4 /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php(83): GraphQL\Executor\ReferenceExecutor::buildExecutionContext(Object in /var/www/github/issues/webonyx/vendor/webonyx/graphql-php/src/Utils/Utils.php on line 627 ```
Activity
vladar commentedon Jun 19, 2019
Should be fixed in master. Thanks for the detailed description.
Array in variables in place of object shouldn't cause fatal error (fixes