diff --git a/lib/gallery.php b/lib/gallery.php index c6f1585b4b..a79cde7b83 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) ?