From 87962c5b3b4029618e12a1e6afc93623e8807a58 Mon Sep 17 00:00:00 2001 From: Sebastian Molenda Date: Thu, 2 Jan 2025 14:35:19 +0100 Subject: [PATCH] Correct keys validation expression --- src/PubNub/Endpoints/Endpoint.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PubNub/Endpoints/Endpoint.php b/src/PubNub/Endpoints/Endpoint.php index 51b3363..474991d 100755 --- a/src/PubNub/Endpoints/Endpoint.php +++ b/src/PubNub/Endpoints/Endpoint.php @@ -130,7 +130,7 @@ protected function validateSubscribeKey() { $subscribeKey = $this->pubnub->getConfiguration()->getSubscribeKey(); - if ($subscribeKey == null) { + if ($subscribeKey == null || empty($subscribeKey)) { throw new PubNubValidationException("Subscribe Key not configured"); } } @@ -142,7 +142,7 @@ protected function validatePublishKey() { $publishKey = $this->pubnub->getConfiguration()->getPublishKey(); - if ($publishKey == null) { + if ($publishKey == null || empty($publishKey)) { throw new PubNubValidationException("Publish Key not configured"); } } @@ -154,7 +154,7 @@ protected function validateSecretKey() { $secretKey = $this->pubnub->getConfiguration()->getSecretKey(); - if ($secretKey === null) { + if ($secretKey === null || empty($secretKey)) { throw new PubNubValidationException("Secret key not configured"); } }