Fixed E_NOTICE when 'title' is absent (uninitialized array key) (#5390)

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2018-07-17 07:13:22 +02:00 committed by Hypolite Petovan
parent e0ecbd0b95
commit 04b513ba95

View file

@ -547,6 +547,8 @@ class BBCode extends BaseObject
if (isset($data["title"])) {
$data["title"] = strip_tags($data["title"]);
$data["title"] = str_replace(["http://", "https://"], "", $data["title"]);
} else {
$data["title"] = null;
}
if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false) || Config::get('system', 'always_show_preview')) && !empty($data["image"])) {