From 0cf6eb7d3c3713e6dfdb2d46dc917b5d52245a0f Mon Sep 17 00:00:00 2001 From: Freerk Minnema Date: Wed, 24 Jul 2019 10:14:00 +0200 Subject: [PATCH] Only initClient in the constructor if the minimum amount of required params was passed/ --- Mplusqapiclient.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mplusqapiclient.php b/Mplusqapiclient.php index aa97502..381f394 100755 --- a/Mplusqapiclient.php +++ b/Mplusqapiclient.php @@ -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(); + } } }