Skip to content

Commit 42280ba

Browse files
author
Christoph Schläpfer
committed
Changed the Parameter position for & as to not break Backwards compatibility
1 parent 04621c5 commit 42280ba

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pve2_api.class.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PVE2_API {
3939
protected $login_ticket_timestamp = null;
4040
protected $cluster_node_list = null;
4141

42-
public function __construct ($hostname, $username, $realm, $password, $tokenid, $tokensecret, $port = 8006, $verify_ssl = false) {
42+
public function __construct ($hostname, $username, $realm, $password, $port = 8006, $verify_ssl = false, $tokenid = null, $tokensecret = null, ) {
4343
if ((empty($hostname) || empty($realm)) || (empty($username) && empty($password) && empty($tokenid) && empty($tokensecret)) || empty($port)) {
4444
throw new PVE2_Exception("Hostname/Realm and either Username/Password or TokenId/TokenSecret are required for PVE2_API object constructor.", 1);
4545
}
@@ -56,14 +56,14 @@ public function __construct ($hostname, $username, $realm, $password, $tokenid,
5656
throw new PVE2_Exception("verify_ssl must be boolean.", 7);
5757
}
5858

59-
$this->hostname = $hostname;
60-
$this->username = $username;
61-
$this->realm = $realm;
62-
$this->tokenid = $tokenid;
63-
$this->tokensecret= $tokensecret;
64-
$this->password = $password;
65-
$this->port = $port;
66-
$this->verify_ssl = $verify_ssl;
59+
$this->hostname = $hostname;
60+
$this->username = $username;
61+
$this->realm = $realm;
62+
$this->tokenid = $tokenid;
63+
$this->tokensecret = $tokensecret;
64+
$this->password = $password;
65+
$this->port = $port;
66+
$this->verify_ssl = $verify_ssl;
6767
// Check if we have a tokenid and tokensecret, if so, we can use API token access.
6868
if (!empty($tokenid) && !empty($tokensecret)) {
6969
$this->api_token_access = true;

0 commit comments

Comments
 (0)