'$action_url' => $url,
'$search_label' => L10n::t('Search'),
'$save_label' => $save_label,
- '$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'),
+ '$savedsearch' => local_user() && Feature::isEnabled(local_user(),'savedsearch'),
'$search_hint' => L10n::t('@name, !forum, #tags, content'),
'$mode' => $mode
];
{
// Add subthread to the item menu
$subthread = [];
- if (local_user() == $arr['item']['uid'] && $arr['item']['parent'] == $arr['item']['id'] && !$arr['item']['self']) {
+ if (
+ local_user()
+ && local_user() == $arr['item']['uid']
+ && $arr['item']['parent'] == $arr['item']['id']
+ && !$arr['item']['self'])
+ {
$subthread = [
'menu' => 'follow_thread',
'title' => L10n::t('Follow Thread'),