From fbf0c051f0f5e4c1c69f4679180643e2c0e5a5e5 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Fri, 28 Mar 2025 11:06:24 +0100 Subject: [PATCH] OembedExtractor.php: fix --- inc/Service/Embed/OembedExtractor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/Service/Embed/OembedExtractor.php b/inc/Service/Embed/OembedExtractor.php index 759e9c60..f86b2013 100644 --- a/inc/Service/Embed/OembedExtractor.php +++ b/inc/Service/Embed/OembedExtractor.php @@ -40,7 +40,7 @@ class OembedExtractor { ], $this->provider_timeout ); - $json = \json_decode($body, null, 512, \JSON_THROW_ON_ERROR); + $json = \json_decode($body, true, 512, \JSON_THROW_ON_ERROR); $ret = [ '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->title = $ret['title']; $resp->thumbnail_url = $ret['thumbnail_url']; - return $ret; + return $resp; } }