From c4e73769a491df69dae09dc3c32cd40b43470a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alfaiate?= Date: Mon, 10 Jun 2024 11:26:37 +0700 Subject: [PATCH] Fix encode option --- src/PubSubClient.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PubSubClient.php b/src/PubSubClient.php index 926ce1b..8586a27 100644 --- a/src/PubSubClient.php +++ b/src/PubSubClient.php @@ -196,6 +196,10 @@ public function __construct(array $config = []) $config['universeDomain'] ); + if ($config['transport'] !== 'rest') { + $this->encode = true; + } + $this->projectId = $this->detectProjectId($config); $this->clientConfig = $config;