forked from leftypol/leftypol
OembedExtractor.php: fix
This commit is contained in:
parent
83e04c639a
commit
fbf0c051f0
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue