From 382b1467614a02099f55336eef58eb22932f0c61 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Fri, 1 Aug 2025 09:45:39 -0300 Subject: [PATCH] fix: validate current user When we start the class, the default value is null, when we set an empty user, will be defined to empty string. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/NextcloudApiContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NextcloudApiContext.php b/src/NextcloudApiContext.php index 9c8fea9..f018f81 100644 --- a/src/NextcloudApiContext.php +++ b/src/NextcloudApiContext.php @@ -175,7 +175,7 @@ public function sendRequest(string $verb, string $url, $body = null, array $head } $fullUrl = $this->baseUrl . $url; $client = new Client(); - if (!empty($this->currentUser)) { + if (!is_null($this->currentUser)) { $options = array_merge( ['cookies' => $this->getUserCookieJar($this->currentUser)], $options