]> git.mxchange.org Git - friendica.git/commitdiff
Avoid warning messages at "strstr"
authorMichael Vogel <icarus@dabo.de>
Thu, 5 May 2016 18:36:23 +0000 (20:36 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 5 May 2016 18:36:23 +0000 (20:36 +0200)
include/bbcode.php

index c5c93ca64e0e81e051d88b1b35bf5cc2568603a9..bc307677702bc6ce40c1cd45734f4d1ff92ae2ea 100644 (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"];
        }