don't show notices with deleted profiles
This commit is contained in:
parent
45c4078ca9
commit
360fdb219d
@ -191,6 +191,14 @@ class NoticeListItem extends Widget
|
|||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
|
if (empty($this->notice)) {
|
||||||
|
common_log(LOG_WARNING, "Trying to show missing notice; skipping.");
|
||||||
|
return;
|
||||||
|
} else if (empty($this->profile)) {
|
||||||
|
common_log(LOG_WARNING, "Trying to show missing profile (" . $this->notice->profile_id . "); skipping.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->showStart();
|
$this->showStart();
|
||||||
if (Event::handle('StartShowNoticeItem', array($this))) {
|
if (Event::handle('StartShowNoticeItem', array($this))) {
|
||||||
$this->showNotice();
|
$this->showNotice();
|
||||||
|
Loading…
Reference in New Issue
Block a user