From: Jeffery To Date: Fri, 12 Jun 2009 11:55:41 +0000 (+0800) Subject: Fix "Trying to get property of non-object" errors when accessing the people search... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cfea2b0c4e21bc61ec250c8f34ec8c9aa6536e83;p=quix0rs-gnu-social.git Fix "Trying to get property of non-object" errors when accessing the people search results page --- diff --git a/lib/peoplesearchresults.php b/lib/peoplesearchresults.php index d3f8408525..9cd162baa0 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 a4cc235552..c22da00cb2 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');