]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
error checking in subscriptions
authorEvan Prodromou <evan@prodromou.name>
Mon, 8 Sep 2008 20:10:20 +0000 (16:10 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 8 Sep 2008 20:10:20 +0000 (16:10 -0400)
darcs-hash:20080908201020-84dde-233d38e3cb65f1778a34456193cd3f013e8d94a8.gz

lib/gallery.php

index c6f1585b4bb77886ae198f764e9fcfc2e7858625..a79cde7b83475373e16cc274df13a86484f50ce5 100644 (file)
@@ -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) ?