diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-12 19:55:41 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-12 19:55:41 +0800 |
commit | cfea2b0c4e21bc61ec250c8f34ec8c9aa6536e83 (patch) | |
tree | b7a9d9d90773a9edde8fb5791b45ff34cdbda195 | |
parent | 1b76df4b6aa4d5f092fa4f7188a9e853443452e1 (diff) |
Fix "Trying to get property of non-object" errors when accessing the people search results page
-rw-r--r-- | lib/peoplesearchresults.php | 2 | ||||
-rw-r--r-- | lib/profilelist.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/peoplesearchresults.php b/lib/peoplesearchresults.php index d3f840852..9cd162baa 100644 --- a/lib/peoplesearchresults.php +++ b/lib/peoplesearchresults.php @@ -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'; diff --git a/lib/profilelist.php b/lib/profilelist.php index a4cc23555..c22da00cb 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -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'); |