1
0
Fork 0

Merge pull request #2504 from annando/1605-share2

Avoid warning messages at "strstr"
This commit is contained in:
Tobias Diekershoff 2016-05-06 07:42:35 +02:00
commit c2a648adb2

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"];
}