cakemail / cakemail-php

Client of Cakemail's API Next-Gen
MIT License
0 stars 2 forks source link

Undefined variable $params #1

Closed mosdraev closed 3 years ago

mosdraev commented 4 years ago

These issues are on Cakemail\Subapis\UserApi::getSelf() and Cakemail\Subapis\AccountApi::getSelf()

When getSelf() is called using $api->account->getSelf(); it returns Undefined variable $params

Sample code from UserApi class

public function getSelf()
{
        if (gettype($params) != 'array' && gettype($params) != 'NULL') {
            throw new ApiException('Parameter must be an array');
        }

        return new Response($this->openApiObj->getSelfUser());
}

$params variable has no point of reference.

vlamanna commented 4 years ago

Thanks for reporting, we will work on a fix for this.

demetrius-edelin commented 4 years ago

Hello,

The bug is fixed now in 1.2.1

Best regards.