]> git.mxchange.org Git - friendica.git/commitdiff
Fixed E_NOTICE when 'title' is absent (uninitialized array key) (#5390)
authorRoland Häder <Quix0r@users.noreply.github.com>
Tue, 17 Jul 2018 05:13:22 +0000 (07:13 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Tue, 17 Jul 2018 05:13:22 +0000 (01:13 -0400)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/Content/Text/BBCode.php

index de3877d3f1848f3879817f504720feda911e2a05..fdabadef56ad691316d32a9a64ace06f2992d1cd 100644 (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"])) {