mirror of
https://github.com/friendica/friendica
synced 2024-12-23 07:20:15 +00:00
Avoid blank network page on database issues
This commit is contained in:
parent
32f8b652ad
commit
47478fe8f7
2 changed files with 13 additions and 6 deletions
|
@ -222,7 +222,9 @@ class Network extends Timeline
|
||||||
|
|
||||||
$o .= $this->conversation->render($items, Conversation::MODE_NETWORK, false, false, $this->getOrder(), $this->session->getLocalUserId());
|
$o .= $this->conversation->render($items, Conversation::MODE_NETWORK, false, false, $this->getOrder(), $this->session->getLocalUserId());
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Exception when fetching items', ['code' => $e->getCode(), 'message' => $e->getMessage()]);
|
||||||
$o .= $this->l10n->t('Error %d (%s) while fetching the timeline.', $e->getCode(), $e->getMessage());
|
$o .= $this->l10n->t('Error %d (%s) while fetching the timeline.', $e->getCode(), $e->getMessage());
|
||||||
|
$items = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->pConfig->get($this->session->getLocalUserId(), 'system', 'infinite_scroll')) {
|
if ($this->pConfig->get($this->session->getLocalUserId(), 'system', 'infinite_scroll')) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Network extends NetworkModule
|
||||||
System::htmlUpdateExit($o);
|
System::htmlUpdateExit($o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
||||||
$items = $this->getChannelItems($request, $this->session->getLocalUserId());
|
$items = $this->getChannelItems($request, $this->session->getLocalUserId());
|
||||||
} elseif ($this->community->isTimeline($this->selectedTab)) {
|
} elseif ($this->community->isTimeline($this->selectedTab)) {
|
||||||
|
@ -34,6 +35,10 @@ class Network extends NetworkModule
|
||||||
} else {
|
} else {
|
||||||
$items = $this->getItems();
|
$items = $this->getItems();
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->logger->error('Exception when fetching items', ['code' => $e->getCode(), 'message' => $e->getMessage()]);
|
||||||
|
$items = [];
|
||||||
|
}
|
||||||
|
|
||||||
$o = $this->conversation->render($items, Conversation::MODE_NETWORK, true, false, $this->getOrder(), $this->session->getLocalUserId());
|
$o = $this->conversation->render($items, Conversation::MODE_NETWORK, true, false, $this->getOrder(), $this->session->getLocalUserId());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue