sforkowany z mirror/friendica
Fix count() warning in Model\Profile
- Replace x() calls with empty() in Profile::load - Remove extraneous $a->page['aside'] initialization2022.09-rc
rodzic
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'),
|
||||
|
|
Ładowanie…
Reference in New Issue