Closed Shade634 closed 4 years ago
Thats old code, i have updated this line on the same day, in front of this if params i forgot are "!". https://github.com/MrKampf/proxmoxVE/blob/master/src/proxmox/pve.php#L59 Have a nice day :-)
Is this available trough composer already? :) and thanks for the quick response.
I dont know why, but the release hasn't used the code, i have created a new version, in this it's work, sorry for this issue :-).
proxmoxVE/src/proxmox/pve.php line 59, i struggle to understand this logic, its also what breaks the code.
if(is_array($json)){ //Is $json are array throw new AuthenticationException('Can\'t login with this data.'); } if(array_key_exists('data',$json)){//Is key 'data' in array throw new AuthenticationException('Can\'t login with this data.'); } $this->CSRFPreventionToken = $json['data']['CSRFPreventionToken']; //Save the CSRF token in class variable
Basically it says, if array throw error, if not, use array: $json['data']['CSRFPreventionToken'] So it will never get there?