Fix "Trying to get property of non-object" errors when accessing the people search results page
This commit is contained in:
parent
1b76df4b6a
commit
cfea2b0c4e
@ -56,7 +56,7 @@ class PeopleSearchResults extends ProfileList
|
|||||||
|
|
||||||
function __construct($profile, $terms, $action)
|
function __construct($profile, $terms, $action)
|
||||||
{
|
{
|
||||||
parent::__construct($profile, $terms, $action);
|
parent::__construct($profile, null, $action);
|
||||||
$this->terms = array_map('preg_quote',
|
$this->terms = array_map('preg_quote',
|
||||||
array_map('htmlspecialchars', $terms));
|
array_map('htmlspecialchars', $terms));
|
||||||
$this->pattern = '/('.implode('|',$terms).')/i';
|
$this->pattern = '/('.implode('|',$terms).')/i';
|
||||||
|
@ -208,7 +208,7 @@ class ProfileList extends Widget
|
|||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
$this->out->elementStart('li', 'entity_block');
|
$this->out->elementStart('li', 'entity_block');
|
||||||
if ($user->id == $this->owner->id) {
|
if ($this->owner && $user->id == $this->owner->id) {
|
||||||
$this->showBlockForm();
|
$this->showBlockForm();
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
|
Loading…
Reference in New Issue
Block a user