Skip to content

Commit

Permalink
Merge branch 'develop' into feat/import
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaha authored Jul 27, 2023
2 parents ed4fc0a + 86f5f96 commit 4eb014e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Traits/Soap/SoapVmApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function getObjectInfo(string $objectId, string $objectType, string $path
} catch (\Exception $exception) {
Log::error(
"SOAP REQUEST FAILED:\nMessage: ".$exception->getMessage().
"\nSOAP request: ".$this->soapClient->__last_request.
"\nSOAP response: ".$this->soapClient->__last_response ?? ''
"\nSOAP request: ".($this->soapClient->__getLastRequest() ?? '').
"\nSOAP response: ".($this->soapClient->__getLastResponse() ?? '')
);

if (array_keys(json_decode(json_encode($exception->detail), true))[0] === 'ManagedObjectNotFoundFault') {
Expand Down
6 changes: 3 additions & 3 deletions src/VmWareClientInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ private function createSoapSession(): void
];
$this->soapClient->Login($loginMessage);

if (isset($this->soapClient->_cookies)) {
$soapSessionToken = $this->soapClient->_cookies['vmware_soap_session'][0];
if (array_key_exists('vmware_soap_session', $this->soapClient->__getCookies())) {
$soapSessionToken = $this->soapClient->__getCookies()['vmware_soap_session'][0];
} else {
$responseHeaders = $this->soapClient->__last_response_headers;
$responseHeaders = $this->soapClient->__getLastResponseHeaders();

$string = strstr($responseHeaders, 'vmware_soap_session');
$string = strstr($string, '"');
Expand Down

0 comments on commit 4eb014e

Please sign in to comment.