API v2 ActivitiesApi error for call getActivities function

I work with the v2 APIs of the client/php component.
When I call getActivities function, “InvalidiArgumentException” is thrown.
The exact error is:
"InvalidArgumentException: Invalid array ‘\Pipedrive\versions\v2\Model\ActivityItemParticipants’ "

The problem comes from the fact that when I analyze the json retrieved, the “participants” property is sometimes an array or sometimes a class.

It’s urgent, I’m stuck in my developments.

THANKS

Basic source code tested:

        // Configure API key authorization: api_key
        $this->config = (new Pipedrive\versions\v2\Configuration())->setApiKey('api_token', "API KEY TOKEN");

        $this->client = new GuzzleHttp\Client();

        $apiInstance = new Pipedrive\versions\v2\Api\ActivitiesApi(
        // If you want to use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
        // This is optional, `GuzzleHttp\Client` will be used as default.
            $this->client, $this->config
        );

        try {
            $result = $apiInstance->getActivities();
            echo '<pre>';
            print_r($result);
            echo '</pre>';
        } catch (Exception $e) {
            echo 'Exception when calling ActivitiesApi->getActivities: ', $e->getMessage(), PHP_EOL;
        }