mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
to fix "Undefined index: html"
https://community.humhub.com/content/perma?id=107414
This commit is contained in:
parent
e899710a0a
commit
4ee1f3f95d
@ -115,7 +115,7 @@ class UrlOembed extends \yii\db\ActiveRecord
|
||||
if ($jsonOut != "") {
|
||||
try {
|
||||
$data = \yii\helpers\Json::decode($jsonOut);
|
||||
if (isset($data['type']) && ($data['type'] === "video" || $data['type'] === 'rich' || $data['type'] === 'photo')) {
|
||||
if (isset($data['html']) && isset($data['type']) && ($data['type'] === "video" || $data['type'] === 'rich' || $data['type'] === 'photo')) {
|
||||
$html = "<div data-guid='".uniqid('oembed-')."' data-richtext-feature class='oembed_snippet' data-url='" . \yii\helpers\Html::encode($url) . "'>" . $data['html'] . "</div>";
|
||||
}
|
||||
} catch (\yii\base\InvalidParamException $ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user