Replace deprecated calls to defaults() by ?? and ?: in src/
This commit is contained in:
@@ -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."/";
|
||||
|
||||
Reference in New Issue
Block a user