mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 22:39:16 +08:00
fixed bug. #295
This commit is contained in:
parent
14b621428f
commit
75be6587e7
@ -321,7 +321,7 @@ $whiterule = file(WHITERULE_SRC, FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
|
||||
$whiterule=array_fill_keys($whiterule, 0);
|
||||
$ARR_WHITE_RULE_LIST = array_merge($whiterule, $ARR_WHITE_RULE_LIST);
|
||||
foreach($ARR_WHITE_RULE_LIST as $row => $v){
|
||||
if(empty($row) || $row{0} !== '@' || $row{1} !== '@'){
|
||||
if(empty($row) || substr($row, 0, 1) !== '@' || substr($row, 1, 1) !== '@'){
|
||||
continue;
|
||||
}
|
||||
$matches = array();
|
||||
@ -340,7 +340,7 @@ foreach($ARR_WHITE_RULE_LIST as $row => $v){
|
||||
}
|
||||
|
||||
foreach($wrote_wild as $core_str => $val){
|
||||
if($core_str{0} === '/'){
|
||||
if(substr($core_str, 0, 1) === '/'){
|
||||
$match_rule = $core_str;
|
||||
}else{
|
||||
$match_rule = str_replace(array('.', '*'), array('\\.', '.*'), $core_str);
|
||||
|
Loading…
Reference in New Issue
Block a user