return [];
}
- $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked'));
+ $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked') ?? '');
if (empty($str_blocked)) {
return [];
}
$this->connected = false;
$port = 0;
- $serveraddr = trim($this->configCache->get('database', 'hostname'));
+ $serveraddr = trim($this->configCache->get('database', 'hostname') ?? '');
$serverdata = explode(':', $serveraddr);
$host = trim($serverdata[0]);
if (count($serverdata) > 1) {
$previews[] = $medium['preview'];
}
- $type = explode('/', explode(';', $medium['mimetype'])[0]);
+ $type = explode('/', explode(';', $medium['mimetype'] ?? '')[0]);
if (count($type) < 2) {
Logger::info('Unknown MimeType', ['type' => $type, 'media' => $medium]);
$filetype = 'unkn';
/* Installed langs */
$lang_choices = DI::l10n()->getAvailableLanguages();
- if (strlen(DI::config()->get('system', 'directory_submit_url')) &&
- !strlen(DI::config()->get('system', 'directory'))) {
+ if (DI::config()->get('system', 'directory_submit_url') &&
+ !DI::config()->get('system', 'directory')) {
DI::config()->set('system', 'directory', dirname(DI::config()->get('system', 'directory_submit_url')));
DI::config()->delete('system', 'directory_submit_url');
}
'$submit' => $this->t('Submit'),
'$lbl_info1' => $lbl_info1,
'$lbl_info2' => $this->t('Their personal note'),
- '$reason' => trim($contact['reason']),
+ '$reason' => trim($contact['reason'] ?? ''),
'$infedit' => $this->t('Edit contact notes'),
'$common_link' => 'contact/' . $contact['id'] . '/contacts/common',
'$relation_text' => $relation_text,
}
if ($selectedFields['tags']) {
- $tags = str_replace(',', ' ', $contact['keywords']);
+ $tags = str_replace(',', ' ', $contact['keywords'] ?? '');
$tags = explode(' ', $tags);
$cleaned = [];