aboutsummaryrefslogtreecommitdiff
path: root/php-client/class.phpipam-api.php
diff options
context:
space:
mode:
authorGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-11-15 19:09:26 +0100
committerGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-11-15 19:09:26 +0100
commit6b057c61ed4601407d32e05070bec5a77fd7a798 (patch)
tree3f77e87138774a15e30a348ef7eac88c4774005d /php-client/class.phpipam-api.php
parentfaf3330c7f7bad0932e05e9f149be4a559575f56 (diff)
parent990f06b6fe699340df8b1bf8bf835a0fb949a507 (diff)
downloadphpipam-api-clients-6b057c61ed4601407d32e05070bec5a77fd7a798.tar.gz
Merge branch 'master' of https://github.com/phpipam/phpipam-api-clients
Diffstat (limited to 'php-client/class.phpipam-api.php')
-rw-r--r--php-client/class.phpipam-api.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/php-client/class.phpipam-api.php b/php-client/class.phpipam-api.php
index 08b04e5..686a16b 100644
--- a/php-client/class.phpipam-api.php
+++ b/php-client/class.phpipam-api.php
@@ -538,6 +538,7 @@ class phpipam_api_client {
* @return void
*/
public function set_api_identifiers ($identifiers) {
+ $this->api_server_identifiers = false; // clear this to forget any previous settings
if(is_array($identifiers)) {
if(sizeof($identifiers)>0 && !$this->api_encrypt) {
// reset
@@ -547,7 +548,7 @@ class phpipam_api_client {
$this->api_server_identifiers = array();
foreach ($identifiers as $cnt=>$i) {
if($cnt==0) { $this->api_server_identifiers['id'] = $i; }
- else { $this->api_server_identifiers['id'.$i] = $i; }
+ else { $this->api_server_identifiers['id'.($cnt+1)] = $i; }
}
}