mirror of
https://github.com/friendica/friendica
synced 2025-04-28 17:04:23 +02:00
Replace deprecated calls to defaults() by ?? and ?: in src/
This commit is contained in:
parent
c0b78a9720
commit
146646c4d4
41 changed files with 239 additions and 233 deletions
|
@ -338,12 +338,12 @@ class BaseURL
|
|||
/* Relative script path to the web server root
|
||||
* Not all of those $_SERVER properties can be present, so we do by inverse priority order
|
||||
*/
|
||||
$relative_script_path = '';
|
||||
$relative_script_path = defaults($this->server, 'REDIRECT_URL', $relative_script_path);
|
||||
$relative_script_path = defaults($this->server, 'REDIRECT_URI', $relative_script_path);
|
||||
$relative_script_path = defaults($this->server, 'REDIRECT_SCRIPT_URL', $relative_script_path);
|
||||
$relative_script_path = defaults($this->server, 'SCRIPT_URL', $relative_script_path);
|
||||
$relative_script_path = defaults($this->server, 'REQUEST_URI', $relative_script_path);
|
||||
$relative_script_path =
|
||||
($this->server['REDIRECT_URL'] ?? '' ) ?:
|
||||
($this->server['REDIRECT_URI'] ?? '' ) ?:
|
||||
($this->server['REDIRECT_SCRIPT_URL'] ?? '' ) ?:
|
||||
($this->server['SCRIPT_URL'] ?? '' ) ?:
|
||||
$this->server['REQUEST_URI'] ?? '';
|
||||
|
||||
/* $relative_script_path gives /relative/path/to/friendica/module/parameter
|
||||
* QUERY_STRING gives pagename=module/parameter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue