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

Signed-off-by: Roland Häder <roland@mxchange.org>
pull/5392/head
Roland Häder 2018-07-17 07:13:22 +02:00 zatwierdzone przez Hypolite Petovan
rodzic e0ecbd0b95
commit 04b513ba95
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

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