Skip to content

Commit

Permalink
Only initClient in the constructor if the minimum amount of required …
Browse files Browse the repository at this point in the history
…params was passed/
  • Loading branch information
freerk-mpluskassa committed Jul 24, 2019
1 parent 9b3647a commit 0cf6eb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Mplusqapiclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public function __construct($params=null)
if (isset($params['apiSecret'])) {
$this->setApiSecret($params['apiSecret']);
}
$this->initClient();
if (isset($params['apiServer']) and isset($params['apiPort']) and isset($params['apiIdent']) and isset($params['apiSecret'])) {
$this->initClient();
}
}
}

Expand Down

0 comments on commit 0cf6eb7

Please sign in to comment.