Fix notice in Util\Network

This commit is contained in:
Hypolite Petovan 2018-07-17 21:00:22 -04:00
parent 050ad68b9f
commit 1b6727fb9c

View File

@ -559,9 +559,8 @@ class Network
*/
public static function isUrlBlocked($url)
{
$h = @parse_url($url);
if (! $h) {
$host = @parse_url($url, PHP_URL_HOST);
if (! $host) {
return true;
}
@ -570,10 +569,8 @@ class Network
return false;
}
$host = strtolower($h['host']);
foreach ($domain_blocklist as $domain_block) {
if (strtolower($domain_block['domain']) == $host) {
if (strcasecmp($domain_block['domain'], $host) === 0) {
return true;
}
}