Fix count() warning in Model\Profile
- Replace x() calls with empty() in Profile::load - Remove extraneous $a->page['aside'] initialization
This commit is contained in:
parent
da4892b4d2
commit
b0564ea40d
|
@ -92,14 +92,14 @@ class Profile
|
|||
{
|
||||
$user = dba::selectFirst('user', ['uid'], ['nickname' => $nickname]);
|
||||
|
||||
if (!$user && !count($user) && !count($profiledata)) {
|
||||
if (!DBM::is_result($user) && empty($profiledata)) {
|
||||
logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
|
||||
notice(L10n::t('Requested account is not available.') . EOL);
|
||||
$a->error = 404;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!x($a->page, 'aside')) {
|
||||
if (empty($a->page['aside'])) {
|
||||
$a->page['aside'] = '';
|
||||
}
|
||||
|
||||
|
@ -157,10 +157,6 @@ class Profile
|
|||
require_once $theme_info_file;
|
||||
}
|
||||
|
||||
if (!x($a->page, 'aside')) {
|
||||
$a->page['aside'] = '';
|
||||
}
|
||||
|
||||
if (local_user() && local_user() == $a->profile['uid'] && $profiledata) {
|
||||
$a->page['aside'] .= replace_macros(
|
||||
get_markup_template('profile_edlink.tpl'),
|
||||
|
|
Loading…
Reference in a new issue