]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix "Trying to get property of non-object" errors when accessing the people search...
authorJeffery To <jeffery.to@gmail.com>
Fri, 12 Jun 2009 11:55:41 +0000 (19:55 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 12 Jun 2009 11:55:41 +0000 (19:55 +0800)
lib/peoplesearchresults.php
lib/profilelist.php

index d3f8408525ae3eb3dd43f9c5a50b37d63bca1841..9cd162baa0afd545b5ce1fe94a05f26ef1d42210 100644 (file)
@@ -56,7 +56,7 @@ class PeopleSearchResults extends ProfileList
 
     function __construct($profile, $terms, $action)
     {
-        parent::__construct($profile, $terms, $action);
+        parent::__construct($profile, null, $action);
         $this->terms = array_map('preg_quote',
                                  array_map('htmlspecialchars', $terms));
         $this->pattern = '/('.implode('|',$terms).')/i';
index a4cc235552a4d24723cbb5abe9934bfa1c9e08a6..c22da00cb2c1a87e1e498acb5328bb3452c3d130 100644 (file)
@@ -208,7 +208,7 @@ class ProfileList extends Widget
             }
             $this->out->elementEnd('li');
             $this->out->elementStart('li', 'entity_block');
-            if ($user->id == $this->owner->id) {
+            if ($this->owner && $user->id == $this->owner->id) {
                 $this->showBlockForm();
             }
             $this->out->elementEnd('li');