Fix some notices/warnings again
This commit is contained in:
parent
11e71780b9
commit
d3e12c58e2
2 changed files with 9 additions and 9 deletions
|
@ -959,7 +959,7 @@ function api_account_verify_credentials($type)
|
||||||
// - Adding last status
|
// - Adding last status
|
||||||
if (!$skip_status) {
|
if (!$skip_status) {
|
||||||
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
||||||
if ($item) {
|
if (!empty($item)) {
|
||||||
$user_info['status'] = api_format_item($item, $type);
|
$user_info['status'] = api_format_item($item, $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1318,7 +1318,7 @@ function api_status_show($type, $item_id)
|
||||||
$status_info = [];
|
$status_info = [];
|
||||||
|
|
||||||
$item = api_get_item(['id' => $item_id]);
|
$item = api_get_item(['id' => $item_id]);
|
||||||
if ($item) {
|
if (!empty($item)) {
|
||||||
$status_info = api_format_item($item, $type);
|
$status_info = api_format_item($item, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1382,7 +1382,7 @@ function api_users_show($type)
|
||||||
$user_info = api_get_user($a);
|
$user_info = api_get_user($a);
|
||||||
|
|
||||||
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
||||||
if ($item) {
|
if (!empty($item)) {
|
||||||
$user_info['status'] = api_format_item($item, $type);
|
$user_info['status'] = api_format_item($item, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3419,7 +3419,7 @@ class Diaspora
|
||||||
$condition = ['guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]];
|
$condition = ['guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]];
|
||||||
$item = Item::selectFirst(['contact-id'], $condition);
|
$item = Item::selectFirst(['contact-id'], $condition);
|
||||||
if (DBA::isResult($item)) {
|
if (DBA::isResult($item)) {
|
||||||
$ret= [];
|
$ret = [];
|
||||||
$ret["root_handle"] = self::handleFromContact($item["contact-id"]);
|
$ret["root_handle"] = self::handleFromContact($item["contact-id"]);
|
||||||
$ret["root_guid"] = $guid;
|
$ret["root_guid"] = $guid;
|
||||||
return $ret;
|
return $ret;
|
||||||
|
@ -3445,12 +3445,12 @@ class Diaspora
|
||||||
$profile = $matches[1];
|
$profile = $matches[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret= [];
|
$ret = [];
|
||||||
|
|
||||||
if ($profile != "") {
|
if (!empty($profile) && ($cid = Contact::getIdForURL($profile))) {
|
||||||
if (Contact::getIdForURL($profile)) {
|
$contact = DBA::selectFirst('contact', ['addr'], ['id' => $cid]);
|
||||||
$author = Contact::getDetailsByURL($profile);
|
if (!empty($contact['addr'])) {
|
||||||
$ret["root_handle"] = $author['addr'];
|
$ret['root_handle'] = $contact['addr'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue