mailjet / mailjet-apiv3-php

[API v3] Mailjet PHP Wrapper
http://dev.mailjet.com
MIT License
263 stars 86 forks source link

fix readme #211

Closed uavn closed 3 years ago

uavn commented 3 years ago

https://github.com/mailjet/mailjet-apiv3-php/issues/208 - Confirmed.

'call' setting is using third param, instead of getting it from the $settings.

$settings['call'] = $call;
/**
     * Set a backup if the variables generating the url are change during a call.
     */
    private function initSettings($call, $settings = [])
    {
        if (!empty($settings['url']) && is_string($settings['url'])) {
            $this->settings['url'] = $settings['url'];
        } else {
            $this->settings['url'] = $this->url;
        }

        if (!empty($settings['version']) && is_string($settings['version'])) {
            $this->settings['version'] = $settings['version'];
        } else {
            $this->settings['version'] = $this->version;
        }

        $settings['call'] = $call;
        if (isset($settings['call']) && is_bool($settings['call'])) {
            $this->settings['call'] = $settings['call'];
        } else {
            $this->settings['call'] = $this->call;
        }

        if (isset($settings['secured']) && is_bool($settings['secured'])) {
            $this->settings['secured'] = $settings['secured'];
        } else {
            $this->settings['secured'] = $this->secure;
        }

        $this->changed = false;
}

this PR fixes README