From 1aa3aa21b39a9fdde72e255c162b10688c8f0b93 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 5 May 2016 20:36:23 +0200 Subject: [PATCH] Avoid warning messages at "strstr" --- include/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index c5c93ca64e..bc30767770 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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"]; } -- 2.39.5