aboutsummaryrefslogtreecommitdiffhomepage
path: root/misc
diff options
context:
space:
mode:
authorwinter2024-12-17 23:16:10 +0000
committerwinter2024-12-17 23:16:10 +0000
commit6f767c4562df4a686720ef96396cea0b2f0c6334 (patch)
tree3b2c3160333c9387c1ab08ce2272aa76191b7465 /misc
parent6f844ff40d936fb6591c2469dd9ff922bc4e575f (diff)
fix fetching objects when auth token is uninitialised
Diffstat (limited to 'misc')
-rw-r--r--misc/get_remote_object_authenticated.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/get_remote_object_authenticated.php b/misc/get_remote_object_authenticated.php
index 3c67005..9f2db43 100644
--- a/misc/get_remote_object_authenticated.php
+++ b/misc/get_remote_object_authenticated.php
@@ -25,7 +25,7 @@ function get_remote_object_authenticated(string $uri, bool $dontLookUpInstance =
$instance = Instance::findByHostname($remoteHost);
}
- if ($instance?->auth?->outboundToken == null) {
+ if (!isset($instance->auth->outboundToken) || $instance->auth->outboundToken == null) {
// hopefully we can make the request anyway?
$context = stream_context_create(['http' => ['method' => $method]]);
$resp = file_get_contents($uri);