mirror of
https://github.com/friendica/friendica
synced 2025-04-19 07:50:12 +00:00
Replace deprecated defaults() calls by ?? and ?: operators in src/Module/
This commit is contained in:
parent
8998926e5b
commit
f59ea2af55
40 changed files with 115 additions and 94 deletions
|
@ -27,7 +27,7 @@ class Bookmarklet extends BaseModule
|
|||
return $output;
|
||||
}
|
||||
|
||||
$referer = Strings::normaliseLink(defaults($_SERVER, 'HTTP_REFERER', ''));
|
||||
$referer = Strings::normaliseLink($_SERVER['HTTP_REFERER'] ?? '');
|
||||
$page = Strings::normaliseLink($app->getBaseURL() . "/bookmarklet");
|
||||
|
||||
if (!strstr($referer, $page)) {
|
||||
|
@ -48,7 +48,7 @@ class Bookmarklet extends BaseModule
|
|||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
'title' => trim(defaults($_REQUEST, 'title', ''), '*'),
|
||||
'title' => trim($_REQUEST['title'] ?? '', '*'),
|
||||
'content' => $content
|
||||
];
|
||||
$output = status_editor($app, $x, 0, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue