Getting a Parse Failure when trying to use global aggregation

Hi! I trying to use global aggregation and getting a parse failure
search_parse_exception: Expected [START_OBJECT] under [global], but got a [START_ARRAY] in [price_glob]

my aggs looks like this:

'aggs' => [
    'status_glob' => [
        'global' => [],
        'aggs' => [
            'avg_status' => ['avg' => ['field' => 'status']],

I am use php with elasticsearch-php-client v2.3.
Can anyone say me where i'm made mistake?

I found solution.

The problem is that PHP will automatically convert "global" : {} into "global" : [], which is no longer valid Elasticsearch DSL and wo solve this problem just write 'global' => new \stdClass()

Thanks for sharing your solution!