diff --git a/include/conversation.php b/include/conversation.php
index ca01997f6a..f10c79d4be 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -229,12 +229,11 @@ function localize_item(&$item)
$xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
$obj = XML::parseString($xmlhead.$item['object']);
- $links = XML::parseString($xmlhead."".unxmlify($obj->link)."");
$Bname = $obj->title;
$Blink = "";
$Bphoto = "";
- foreach ($links->link as $l) {
+ foreach ($obj->link as $l) {
$atts = $l->attributes();
switch ($atts['rel']) {
case "alternate": $Blink = $atts['href'];
diff --git a/mod/poke.php b/mod/poke.php
index a9dfc73f4e..91f33c0def 100644
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -24,19 +24,20 @@ use Friendica\Model\Item;
require_once 'include/security.php';
require_once 'include/items.php';
-function poke_init(App $a) {
-
+function poke_init(App $a)
+{
if (!local_user()) {
return;
}
$uid = local_user();
- $verb = notags(trim($_GET['verb']));
- if (!$verb) {
+ if (empty($_GET['verb'])) {
return;
}
+ $verb = notags(trim($_GET['verb']));
+
$verbs = get_poke_verbs();
if (!array_key_exists($verb, $verbs)) {
@@ -99,7 +100,7 @@ function poke_init(App $a) {
$arr['guid'] = System::createGUID(32);
$arr['uid'] = $uid;
$arr['uri'] = $uri;
- $arr['parent-uri'] = ($parent_uri ? $parent_uri : $uri);
+ $arr['parent-uri'] = (!empty($parent_uri) ? $parent_uri : $uri);
$arr['wall'] = 1;
$arr['contact-id'] = $poster['id'];
$arr['owner-name'] = $poster['name'];
@@ -121,7 +122,7 @@ function poke_init(App $a) {
$arr['origin'] = 1;
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . L10n::t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
- $arr['object'] = '