Avoid warning messages at "strstr"

This commit is contained in:
Michael Vogel 2016-05-05 20:36:23 +02:00
parent 167a8998d6
commit 1aa3aa21b3

View file

@ -103,9 +103,9 @@ function bb_remove_share_information($Text, $plaintext = false, $nolink = false)
$title = htmlentities($data["title"], ENT_QUOTES, 'UTF-8', false);
$text = htmlentities($data["text"], ENT_QUOTES, 'UTF-8', false);
if ($plaintext or strstr($text, $title))
if ($plaintext OR (($title != "") AND strstr($text, $title)))
$data["title"] = $data["url"];
elseif (strstr($title, $text)) {
elseif (($text != "") AND strstr($title, $text)) {
$data["text"] = $data["title"];
$data["title"] = $data["url"];
}