diff --git a/src/Request.php b/src/Request.php index c4630ca..af3fa3f 100644 --- a/src/Request.php +++ b/src/Request.php @@ -85,6 +85,10 @@ protected static function ticket($verifySSL, $verifyHost) if (!$response) { throw new ProxmoxException('Request params empty'); } + + if ($response->data === NULL) { + throw new ProxmoxException('Invalid credentials'); + } // set header self::$Client->setHeader('CSRFPreventionToken', $response->data->CSRFPreventionToken);