From 4f86e05d038c7c89d268d753af46da1974a45406 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 27 Aug 2011 10:01:35 -0400 Subject: [PATCH] wrap use of repeated element in existence check --- classes/Notice.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5