Fix unset property

This commit is contained in:
grandeljay 2022-06-16 14:44:50 +02:00
parent cebe355800
commit 1f5e14f9f2

View file

@ -32,7 +32,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
$cache = new Cache\Embed($url);
$info = $cache->get(true);
if ($info->url) {
if (isset($info->url) && $info->url) {
$code = URL::getResponseCode($info->url);
if (200 !== $code) {
@ -144,11 +144,11 @@ switch ($_SERVER['REQUEST_METHOD']) {
$cache = new Cache\Embed($wish_url);
$info = $cache->get(true);
if (empty($wish_title)) {
if (empty($wish_title) && isset($info->title)) {
$wish_title = $info->title;
}
if (empty($wish_description)) {
if (empty($wish_description) && isset($info->description)) {
$wish_description = $info->description;
}