From: Michael Vogel Date: Sun, 9 Mar 2014 08:26:54 +0000 (+0100) Subject: Avoiding some PHP warnings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9f4ef7c105371fee195b0c506772496e50ec8e7e;p=friendica.git Avoiding some PHP warnings --- diff --git a/include/html2plain.php b/include/html2plain.php index 445a4ab347..54cc44794d 100644 --- a/include/html2plain.php +++ b/include/html2plain.php @@ -221,9 +221,10 @@ function html2plain($html, $wraplength = 75, $compact = false) if (!$compact AND ($message != "")) { $counter = 1; foreach ($urls as $id=>$url) - if (strpos($message, $url) === false) - $message .= "\n".$url." "; - //$message .= "\n[".($counter++)."] ".$url; + if ($url != "") + if (strpos($message, $url) === false) + $message .= "\n".$url." "; + //$message .= "\n[".($counter++)."] ".$url; } $message = str_replace("\n«", "«\n", $message); diff --git a/object/Item.php b/object/Item.php index 2cb131f1a7..17a723acba 100644 --- a/object/Item.php +++ b/object/Item.php @@ -269,22 +269,22 @@ class Item extends BaseObject { } // Disable features that aren't available in several networks - if ($item["item_network"] != "dfrn") { + if (($item["item_network"] != "dfrn") AND isset($buttons["dislike"])) { unset($buttons["dislike"]); $tagger = ''; } - if ($item["item_network"] == "feed") + if (($item["item_network"] == "feed") AND isset($buttons["like"])) unset($buttons["like"]); - if ($item["item_network"] == "mail") + if (($item["item_network"] == "mail") AND isset($buttons["like"])) unset($buttons["like"]); - if (($item["item_network"] == "dspr") AND ($indent == 'comment')) + if (($item["item_network"] == "dspr") AND ($indent == 'comment') AND isset($buttons["like"])) unset($buttons["like"]); // Facebook can like comments - but it isn't programmed in the connector yet. - if (($item["item_network"] == "face") AND ($indent == 'comment')) + if (($item["item_network"] == "face") AND ($indent == 'comment') AND isset($buttons["like"])) unset($buttons["like"]);