wrap use of repeated element in existence check

This commit is contained in:
Evan Prodromou 2011-08-27 10:01:35 -04:00
parent 6ce8134471
commit 4f86e05d03
1 changed files with 4 additions and 2 deletions

View File

@ -1381,8 +1381,10 @@ class Notice extends Memcached_DataObject
if (!empty($this->repeat_of)) {
$repeat = Notice::staticGet('id', $this->repeat_of);
$ctx->forwardID = $repeat->uri;
$ctx->forwardUrl = $repeat->bestUrl();
if (!empty($repeat)) {
$ctx->forwardID = $repeat->uri;
$ctx->forwardUrl = $repeat->bestUrl();
}
}
$act->context = $ctx;