From: Evan Prodromou Date: Sat, 27 Aug 2011 14:01:35 +0000 (-0400) Subject: wrap use of repeated element in existence check X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4f86e05d038c7c89d268d753af46da1974a45406;p=quix0rs-gnu-social.git wrap use of repeated element in existence check --- diff --git a/classes/Notice.php b/classes/Notice.php index d513695192..c45f915711 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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;