mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-02-13 17:12:41 +08:00
兼容php8
This commit is contained in:
parent
fa1191eb71
commit
e734def503
@ -91,7 +91,7 @@ class addressMaker{
|
||||
continue;
|
||||
}
|
||||
|
||||
if($line{0} != '|' || $line{1} != '|'){
|
||||
if($line[0] != '|' || $line[1] != '|'){
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ class addressMaker{
|
||||
$end_pos = strpos($str_hosts, "\n", $i);
|
||||
$line = trim(substr($str_hosts, $i, $end_pos - $i));
|
||||
$i = $end_pos + 1;
|
||||
if(empty($line) || ($line{0} == '#')){//注释行忽略
|
||||
if(empty($line) || ($line[0] == '#')){//注释行忽略
|
||||
continue;
|
||||
}
|
||||
$line = strtolower(preg_replace('/[\s\t]+/', "/", $line));
|
||||
|
Loading…
Reference in New Issue
Block a user