The piece of code causing the issue:
|
function version($version) { |
|
$this->version = (int)$version; |
|
if ($version == 2) { |
|
$this->url_base = $this->url_base . "/2"; |
|
} |
|
} |
This is what I do:

What I did to reproduce the bug
- I get the contact list
- This does not work, which is correct, as I haven't set the version
- I set the version to 2
- I get the contact list
- This works, as intended.
- I set the version back to 1, this is where the $url_base property 'breaks'
- I get the contact list
- This does not work, which is correct, as the version is back to 1
- I set the version back to 2
- I get the contact list
- This does not work, while it should.
$ac->url_base now returns api_url.com/2/2 (Note the double /2!)
Because of this bug it requires me to create new instances of the ActiveCampaign class, instead of using one single instance
The piece of code causing the issue:
activecampaign-api-php/includes/ActiveCampaign.class.php
Lines 78 to 83 in 2bf5b72
This is what I do:

What I did to reproduce the bug
$ac->url_basenow returnsapi_url.com/2/2(Note the double/2!)Because of this bug it requires me to create new instances of the
ActiveCampaignclass, instead of using one single instance