Skip to content

Commit 382b146

Browse files
committed
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 <[email protected]>
1 parent 2a6c49b commit 382b146

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NextcloudApiContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function sendRequest(string $verb, string $url, $body = null, array $head
175175
}
176176
$fullUrl = $this->baseUrl . $url;
177177
$client = new Client();
178-
if (!empty($this->currentUser)) {
178+
if (!is_null($this->currentUser)) {
179179
$options = array_merge(
180180
['cookies' => $this->getUserCookieJar($this->currentUser)],
181181
$options

0 commit comments

Comments
 (0)