Fix notice in Util\Network
This commit is contained in:
parent
050ad68b9f
commit
1b6727fb9c
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user