From: Roland Häder Date: Tue, 17 Jul 2018 05:13:22 +0000 (+0200) Subject: Fixed E_NOTICE when 'title' is absent (uninitialized array key) (#5390) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=04b513ba95f80865be60e873af869363cc6a78e6;p=friendica.git Fixed E_NOTICE when 'title' is absent (uninitialized array key) (#5390) Signed-off-by: Roland Häder --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index de3877d3f1..fdabadef56 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -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"])) {