mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:10:13 +00: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
|
@ -104,7 +104,7 @@ class Network
|
|||
|
||||
$parts2 = [];
|
||||
$parts = parse_url($url);
|
||||
$path_parts = explode('/', defaults($parts, 'path', ''));
|
||||
$path_parts = explode('/', $parts['path'] ?? '');
|
||||
foreach ($path_parts as $part) {
|
||||
if (strlen($part) <> mb_strlen($part)) {
|
||||
$parts2[] = rawurlencode($part);
|
||||
|
@ -801,8 +801,8 @@ class Network
|
|||
$i = 0;
|
||||
$path = "";
|
||||
do {
|
||||
$path1 = defaults($pathparts1, $i, '');
|
||||
$path2 = defaults($pathparts2, $i, '');
|
||||
$path1 = $pathparts1[$i] ?? '';
|
||||
$path2 = $pathparts2[$i] ?? '';
|
||||
|
||||
if ($path1 == $path2) {
|
||||
$path .= $path1."/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue