issue/activity: ignore missing author
[minimedit.git] / widget / issue / activity.php
index cd99e486916af3e58e888fdc1ed6080fd226a9de..f986a53de5653d46a71774df380fa6f8af733149 100644 (file)
@@ -14,7 +14,6 @@ print '<dl class="replies">';
 
 $group = NULL;
 while ($row = $query->fetch()) {
-       $rowuser = new User("profile/{$row->author}");
        if ($group !== $row->issue) {
                $group = $row->issue;
                print '<dt>';
@@ -25,8 +24,11 @@ while ($row = $query->fetch()) {
                print '</dt>';
        }
        print '<dd>';
-       printf('<strong>%s</strong> <small class="date">%s</small>',
-               $rowuser->html, showdate(preg_split('/\D/', $row->created))
+       if ($row->author and $rowuser = new User("profile/{$row->author}")) {
+               printf('<strong>%s</strong> ', $rowuser->html);
+       }
+       printf('<small class="date">%s</small>',
+               showdate(preg_split('/\D/', $row->created))
        );
        printf("\n\t<blockquote>%s</blockquote>", $row->message);
        print "</dd>\n";