OembedExtractor.php: fix

This commit is contained in:
Zankaria 2025-03-28 11:06:24 +01:00
parent 83e04c639a
commit fbf0c051f0

View file

@ -40,7 +40,7 @@ class OembedExtractor {
], ],
$this->provider_timeout $this->provider_timeout
); );
$json = \json_decode($body, null, 512, \JSON_THROW_ON_ERROR); $json = \json_decode($body, true, 512, \JSON_THROW_ON_ERROR);
$ret = [ $ret = [
'title' => $json['title'] ?? null, 'title' => $json['title'] ?? null,
@ -55,12 +55,12 @@ class OembedExtractor {
} }
} }
$this->cache->set("oembed_embedder_$url$provider_url", $ret, $cache_timeout); $this->cache->set("oembed_embedder_$provider_url$url", $ret, $cache_timeout);
} }
$resp = new OembedResponse(); $resp = new OembedResponse();
$resp->title = $ret['title']; $resp->title = $ret['title'];
$resp->thumbnail_url = $ret['thumbnail_url']; $resp->thumbnail_url = $ret['thumbnail_url'];
return $ret; return $resp;
} }
} }