summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gallery.php b/lib/gallery.php
index c6f1585b4..a79cde7b8 100644
--- a/lib/gallery.php
+++ b/lib/gallery.php
@@ -92,8 +92,14 @@ class GalleryAction extends Action {
break;
}
- $other = Profile::staticGet($this->get_other($subs));
+ $other_id = $this->get_other($subs);
+ $other = Profile::staticGet($other_id);
+ if (!$other) {
+ common_log(LOG_WARNING, 'No matching profile for ' . $other_id);
+ continue;
+ }
+
common_element_start('li');
common_element_start('a', array('title' => ($other->fullname) ?