Fix notice in Util\Network
This commit is contained in:
parent
050ad68b9f
commit
1b6727fb9c
1 changed files with 3 additions and 6 deletions
|
@ -559,9 +559,8 @@ class Network
|
||||||
*/
|
*/
|
||||||
public static function isUrlBlocked($url)
|
public static function isUrlBlocked($url)
|
||||||
{
|
{
|
||||||
$h = @parse_url($url);
|
$host = @parse_url($url, PHP_URL_HOST);
|
||||||
|
if (! $host) {
|
||||||
if (! $h) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -570,10 +569,8 @@ class Network
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$host = strtolower($h['host']);
|
|
||||||
|
|
||||||
foreach ($domain_blocklist as $domain_block) {
|
foreach ($domain_blocklist as $domain_block) {
|
||||||
if (strtolower($domain_block['domain']) == $host) {
|
if (strcasecmp($domain_block['domain'], $host) === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue