drupal-graphql / drupal-graphql/graphql
Notice: Trying to access array offset on value of type bool in QueryRouteEnhancer->enhance()
- Dominant language
- PHP
- Stars
- 287
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
When executing a GraphQL query, I see this notice in logs:
```
Notice: Trying to access array offset on value of type bool in Drupal\graphql\Routing\QueryRouteEnhancer->enhance() (line 34 of web/modules/contrib/graphql/src/Routing/QueryRouteEnhancer.php)
```
Here is the code block:
```php
return $defaults + [
'_controller' => $defaults['_graphql']['single'],
'operations' => $operations,
];
```
In that moment the `$defaults['_graphql']` is boolean `TRUE`, instead of array, here is dump of `$defaults` variable:
```
schema:"default:default"
_graphql:true
_controller:"\Drupal\graphql\Controller\RequestController::handleRequest"
_disable_route_normalizer:"TRUE"
_route:"graphql.query.default:default"
_route_object:Symfony\Component\Routing\Route
_raw_variables:Symfony\Component\HttpFoundation\ParameterBag
```
Can anybody describe why this happens and is this a bug in that part of code, or in some previous places?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.