]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
wrap use of repeated element in existence check
authorEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 14:01:35 +0000 (10:01 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 14:02:11 +0000 (10:02 -0400)
classes/Notice.php

index d513695192ce3d5cefd67c3754cd17ba9f79db97..c45f915711736efd965c53f25a28e7a35926343f 100644 (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;