Replace deprecated calls to defaults() by ?? and ?: in src/

This commit is contained in:
Hypolite Petovan 2019-10-16 08:35:14 -04:00
parent c0b78a9720
commit 146646c4d4
41 changed files with 239 additions and 233 deletions

View file

@ -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."/";