mirror of
https://github.com/friendica/friendica
synced 2024-12-23 10:00:20 +00:00
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:
parent
e0ecbd0b95
commit
04b513ba95
1 changed files with 2 additions and 0 deletions
|
@ -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"])) {
|
||||||
|
|
Loading…
Reference in a new issue