From 4ee1f3f95de62140be0063225dcd5a3b5a47ab94 Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Fri, 26 May 2017 14:00:48 +0300 Subject: [PATCH] to fix "Undefined index: html" https://community.humhub.com/content/perma?id=107414 --- protected/humhub/models/UrlOembed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protected/humhub/models/UrlOembed.php b/protected/humhub/models/UrlOembed.php index f05f89358e..98d937422a 100644 --- a/protected/humhub/models/UrlOembed.php +++ b/protected/humhub/models/UrlOembed.php @@ -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 = "
" . $data['html'] . "
"; } } catch (\yii\base\InvalidParamException $ex) {