diff options
| author | wn_ <invalid@email.com> | 2024-08-04 15:42:11 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-08-04 15:42:11 +0000 |
| commit | 9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 (patch) | |
| tree | cff043e8cbfe87cfff5cad9df42949609058ce65 /classes/UrlHelper.php | |
| parent | 6b521b5ed14dbc11bf9fecb40a2cd0ce541db9a8 (diff) | |
Replace basic 'isset()' cases with the null coalescing operator.
Diffstat (limited to 'classes/UrlHelper.php')
| -rw-r--r-- | classes/UrlHelper.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/classes/UrlHelper.php b/classes/UrlHelper.php index 7c426bedf..ba1f474bc 100644 --- a/classes/UrlHelper.php +++ b/classes/UrlHelper.php @@ -276,19 +276,19 @@ class UrlHelper { } $url = $options["url"]; - $type = isset($options["type"]) ? $options["type"] : false; - $login = isset($options["login"]) ? $options["login"] : false; - $pass = isset($options["pass"]) ? $options["pass"] : false; - $auth_type = isset($options["auth_type"]) ? $options["auth_type"] : "basic"; - $post_query = isset($options["post_query"]) ? $options["post_query"] : false; - $timeout = isset($options["timeout"]) ? $options["timeout"] : false; - $last_modified = isset($options["last_modified"]) ? $options["last_modified"] : ""; - $useragent = isset($options["useragent"]) ? $options["useragent"] : false; - $followlocation = isset($options["followlocation"]) ? $options["followlocation"] : true; - $max_size = isset($options["max_size"]) ? $options["max_size"] : Config::get(Config::MAX_DOWNLOAD_FILE_SIZE); // in bytes - $http_accept = isset($options["http_accept"]) ? $options["http_accept"] : false; - $http_referrer = isset($options["http_referrer"]) ? $options["http_referrer"] : false; - $encoding = isset($options["encoding"]) ? $options["encoding"] : false; + $type = $options["type"] ?? false; + $login = $options["login"] ?? false; + $pass = $options["pass"] ?? false; + $auth_type = $options["auth_type"] ?? "basic"; + $post_query = $options["post_query"] ?? false; + $timeout = $options["timeout"] ?? false; + $last_modified = $options["last_modified"] ?? ""; + $useragent = $options["useragent"] ?? false; + $followlocation = $options["followlocation"] ?? true; + $max_size = $options["max_size"] ?? Config::get(Config::MAX_DOWNLOAD_FILE_SIZE); // in bytes + $http_accept = $options["http_accept"] ?? false; + $http_referrer = $options["http_referrer"] ?? false; + $encoding = $options["encoding"] ?? false; $url = ltrim($url, ' '); $url = str_replace(' ', '%20', $url); |