Fix notices
See https://github.com/friendica/friendica/issues/9749#issuecomment-774666356 and https://github.com/friendica/friendica/issues/9747#issuecomment-785262156
This commit is contained in:
parent
43c6563123
commit
5d61599964
2 changed files with 10 additions and 5 deletions
|
@ -188,12 +188,14 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
||||||
if ($update) {
|
if ($update) {
|
||||||
$uri_id = $_REQUEST['uri_id'];
|
$uri_id = $_REQUEST['uri_id'];
|
||||||
$item = Post::selectFirst(['uid', 'parent-uri-id'], ['uri-id' => $uri_id, 'uid' => $update_uid]);
|
$item = Post::selectFirst(['uid', 'parent-uri-id'], ['uri-id' => $uri_id, 'uid' => $update_uid]);
|
||||||
if ($item['uid'] != 0) {
|
if (!empty($item)) {
|
||||||
$a->profile = ['uid' => intval($item['uid'])];
|
if ($item['uid'] != 0) {
|
||||||
} else {
|
$a->profile = ['uid' => intval($item['uid'])];
|
||||||
$a->profile = ['uid' => intval($update_uid)];
|
} else {
|
||||||
|
$a->profile = ['uid' => intval($update_uid)];
|
||||||
|
}
|
||||||
|
$parent_uri_id = $item['parent-uri-id'];
|
||||||
}
|
}
|
||||||
$parent_uri_id = $item['parent-uri-id'];
|
|
||||||
} else {
|
} else {
|
||||||
$uri_id = (($a->argc > 2) ? $a->argv[2] : 0);
|
$uri_id = (($a->argc > 2) ? $a->argv[2] : 0);
|
||||||
$parent_uri_id = $uri_id;
|
$parent_uri_id = $uri_id;
|
||||||
|
|
|
@ -359,6 +359,9 @@ class Community extends BaseModule
|
||||||
$r = Post::selectThreadForUser(0, ['uri-id', 'commented', 'author-link'], $condition, $params);
|
$r = Post::selectThreadForUser(0, ['uri-id', 'commented', 'author-link'], $condition, $params);
|
||||||
|
|
||||||
$items = Post::toArray($r);
|
$items = Post::toArray($r);
|
||||||
|
if (empty($items)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
// Previous page case: once we get the relevant items closest to min_id, we need to restore the expected display order
|
// Previous page case: once we get the relevant items closest to min_id, we need to restore the expected display order
|
||||||
if (empty($item_id) && isset($min_id) && !isset($max_id)) {
|
if (empty($item_id) && isset($min_id) && !isset($max_id)) {
|
||||||
|
|
Loading…
Reference in a new issue